def setup(bot): bot.add_cog(commands(bot))
delete_roles_pretty += role.name + "\n" await client.delete_role(message.server, role) delete_roles_pretty += "```" await client.send_message(message.channel, delete_roles_pretty) # Add all possible commands to the command list command_list = [] command_list += [create_role()] command_list += [add_role()] command_list += [remove_role()] command_list += [roles()] command_list += [bot_help()] command_list += [commands(command_list)] command_list += [slackbot()] command_list += [clean_roles()] ### Bot message handling. Should not have to modify under this comment @client.event async def on_ready(): print('Logged in as ' + client.user.name + ' (ID:' + client.user.id + ') | Connected to ' + str(len(client.servers)) + ' servers | Connected to ' + str(len(set(client.get_all_members()))) + ' users') print('--------') print('Current Discord.py Version: {} | Current Python Version: {}'.format( discord.__version__, platform.python_version()))
def setup(client): client.add_cog(commands(client))
def setup(bot): bot.add_cog(commands(bot)) bot.remove_command('help')
userlist[findPlayer(author)].update() yield from self.bot.send_message(ctx.message.author, level.find(userlist[findPlayer(author)].location).desc) elif userinput.find("back") != -1: userlist[findPlayer(author)].move(level.find(userlist[findPlayer(author)].location).lastlink) userlist[findPlayer(author)].update() yield from self.bot.send_message(ctx.message.author, level.find(userlist[findPlayer(author)].location).desc) else: yield from self.bot.send_message(ctx.message.author, "Unrecognised command") @commands.command(pass_context=True, no_pm=False) @asyncio.coroutine def info(self, ctx): """:use this to get a description of the current room.""" author = str(ctx.message.author) print(author) print(str(userlist[findPlayer(author)].name)) print(str(userlist[findPlayer(author)].location)) yield from self.bot.send_message(ctx.message.author, "you observe that " + level.find(userlist[findPlayer(author)].location).desc) bot.add_cog(commands(bot)) #bot.login('user', 'pass') #print('working') bot.run('token') print('double working')
await ctx.send(f'{random.choice(responses)}') pass @client.listen() async def on_message(message): if "pone musica" in message.content.lower(): await message.channel.send('Yo si se ponerla, no como vos salu2') await client.process_commands(message) @client.listen() async def on_message(message): if "me escuchan?" in message.content.lower(): await message.channel.send('no bro. Sorry') await client.process_commands(message) @client.listen() async def on_message(message): if "estan?" in message.content.lower(): await message.channel.send('No les rompas las pelotas, no te quieren') await client.process_commands(message) client.add_cog(Music(client)) client.add_cog(commands(client)) client.run(TOKEN)
async def on_message(message): msg = message.content try: commands(ctx)
def prefix(bot, message): """Siri's prefix list""" return commands(*config.prefixes)(bot, message)