summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorromangraef <roman.graef@gmail.com>2018-05-15 20:02:18 +0200
committerromangraef <roman.graef@gmail.com>2018-05-15 20:02:18 +0200
commit9187528a1e4d96aee5381138547c62ed7e281aa8 (patch)
tree5aaea27d46ba55d54866cacb130425cbcd560896 /main.py
parent50787a7a3c14b8cbe1890cfdc62bc1d27171209c (diff)
downloadfuckingselfbot-9187528a1e4d96aee5381138547c62ed7e281aa8.tar.gz
fuckingselfbot-9187528a1e4d96aee5381138547c62ed7e281aa8.tar.bz2
fuckingselfbot-9187528a1e4d96aee5381138547c62ed7e281aa8.zip
~stream languageHEADmaster
Diffstat (limited to 'main.py')
-rw-r--r--main.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/main.py b/main.py
index 6385fa5..0b5ee9c 100644
--- a/main.py
+++ b/main.py
@@ -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: