-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathmain.py
64 lines (40 loc) · 1.2 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
52
53
54
55
56
57
58
59
60
61
62
63
64
import keep_alive
import asyncio
import json
import os
import random
import time
import colorama
import discord
import numpy
import requests
from colorama import Fore
from discord.ext import commands
from discord.utils import get
with open('config.json') as f:
config = json.load(f)
token = os.getenv('TOKEN')
bot = commands.Bot('.', description='DarkShdoow', self_bot=True)
def Clear():
os.system('cls')
Clear()
def Init():
token = os.getenv('TOKEN')
try:
bot.run(token, bot=False, reconnect=True)
os.system(f'title (Activity Statuses)')
except discord.errors.LoginFailure:
print(f"{Fore.RED}[ERROR] {Fore.YELLOW}Improper token has been passed"
+ Fore.RESET)
os.system('pause >NUL')
async def ready():
await bot.wait_until_ready()
statuses = ["Live Lofi", f"Lofi Live"]
while not bot.is_closed():
status = random.choice(statuses)
await bot.change_presence(status= discord.Status.do_not_disturb, activity = discord.Streaming(name = status, url = "https://www.twitch.tv/Discord"))
await asyncio.sleep(300)
bot.loop.create_task(ready())
keep_alive.keep_alive()
if __name__ == '__main__':
Init()