diff options
author | romangraef <roman.graef@gmail.com> | 2018-05-15 20:02:18 +0200 |
---|---|---|
committer | romangraef <roman.graef@gmail.com> | 2018-05-15 20:02:18 +0200 |
commit | 9187528a1e4d96aee5381138547c62ed7e281aa8 (patch) | |
tree | 5aaea27d46ba55d54866cacb130425cbcd560896 /main.py | |
parent | 50787a7a3c14b8cbe1890cfdc62bc1d27171209c (diff) | |
download | fuckingselfbot-9187528a1e4d96aee5381138547c62ed7e281aa8.tar.gz fuckingselfbot-9187528a1e4d96aee5381138547c62ed7e281aa8.tar.bz2 fuckingselfbot-9187528a1e4d96aee5381138547c62ed7e281aa8.zip |
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -2,7 +2,7 @@ from functools import wraps from typing import List import discord.utils -from discord import Object +from discord import Object, Guild from discord.ext import commands import discord @@ -203,13 +203,18 @@ async def dump_roles(ctx: commands.Context, roles: List[discord.Role], quiet: bo @bot.command(pass_context=True, name="roles") @check_guild -async def roles_cmd(ctx: commands.Context, quiet: bool = False): - guild: discord.Guild = ctx.guild +async def roles_cmd(ctx: commands.Context, guild: Guild = None,quiet: bool = False): + if guild is None: + guild = ctx.guild roles: List[discord.Role] = guild.roles await dump_roles(ctx, roles, quiet) await ctx.react('✅') - +MODULES = [ + 'stream_cog' +] +for module in MODULES: + bot.load_extension(module) if __name__ == '__main__': with open('token.txt') as f: |