Ejemplo n.º 1
0
def setup(bot):
    bot.add_cog(commands(bot))
Ejemplo n.º 2
0
                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()))
Ejemplo n.º 3
0
def setup(client):
	client.add_cog(commands(client))
Ejemplo n.º 4
0
def setup(bot):
    bot.add_cog(commands(bot))
    bot.remove_command('help')
Ejemplo n.º 5
0
            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')
Ejemplo n.º 6
0
        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)
Ejemplo n.º 7
0
async def on_message(message):
    msg = message.content
    try:
        commands(ctx)
Ejemplo n.º 8
0
def prefix(bot, message):
    """Siri's prefix list"""
    return commands(*config.prefixes)(bot, message)