-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
35 lines (27 loc) · 1.07 KB
/
main.py
File metadata and controls
35 lines (27 loc) · 1.07 KB
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
import discord
import os
from discord.ext import commands
import asyncio
from itertools import cycle
intents = discord.Intents.all()
client = commands.AutoShardedBot(command_prefix="-", intents=intents)
inv = "https://discord.com/api/oauth2/authorize?client_id=799792167803027476&permissions=71167425&scope=bot"
TOKEN = "Nzk5NzkyMTY3ODAzMDI3NDc2.YAIugA.Ck35_qO9xKfspz_QKhEK48maW2E"
STATUS = ["The Streets | v0.1 Alpha", "Use -help for commands!"]
os.chdir(r"/home/yaminahmed/Python/TheStreets")
async def change_status():
await client.wait_until_ready()
msgs = cycle(STATUS)
while not client.is_closed():
current_status = next(msgs)
activity = discord.Game(name=current_status)
await client.change_presence(status=discord.Status.dnd, activity=activity)
await asyncio.sleep(5)
@client.event
async def on_ready():
print("-----( Bot is ready! )-----")
for filename in os.listdir(f"./cogs"):
if filename.endswith(".py"):
client.load_extension(f"cogs.{filename[:-3]}")
client.loop.create_task(change_status())
client.run(TOKEN)