-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
51 lines (34 loc) · 1.11 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import TOK
import discord
from discord.ext import commands
import os
TOKEN = TOK.Token
client = commands.Bot(command_prefix = '::')
@client.event
async def on_ready():
print("Bot connected")
await client.change_presence(activity=discord.Game("Mayoshi is on twitter @mayoshi16"))
def is_it_admin(ctx):
return(ctx.author.id == 323132281545949185)
@client.command(aliases =["rel"])
@commands.check(is_it_admin)
async def reload(ctx, extension):
client.unload_extension(f'cogs.{extension}')
client.load_extension(f'cogs.{extension}')
await ctx.send(f"Reloaded extension : {extension}")
@client.command()
@commands.check(is_it_admin)
async def load(ctx, extension):
client.load_extension(f'cogs.{extension}')
await ctx.send(f"Loaded extension : {extension}")
@client.command()
@commands.check(is_it_admin)
async def status(ctx,*,message):
await client.change_presence(activity=discord.Game(message))
@client.command()
@commands.check(is_it_admin)
async def guilds(ctx):
for guild in client.guilds:
await ctx.send(guild)
client.load_extension("cogs.commands")
client.run(TOKEN)