Jump to content

Discord bot trouble shooting

AinsleyHarriot539

Hey guys im trying to make a discord bot but have run into a problem. According to cmd the bolded line is causing the error.

Thanks for the help

import discord
from discord.ext import commands

Token = 'TOKEN'

client = commands.Bot(command_prefix='#')

@client.event
async def on_ready():
    print ("on")
    
@client.event
async def on_member_join(member):
    role = discord.utils.get(member.server.roles, name='new')
    await client.add_roles(member, role)
    
@client.event
async def on_message(message):
    if message.content.startswith('!accept'):
    await discord.utils.get(member.server.roles, name='trust') 

client.run(Token)

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×