-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
32 lines (27 loc) · 896 Bytes
/
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
import asyncio
import discord
import json
import os
import sys
from code.function import *
from code.keepalive import *
from data.ban import banlist
from discord.ext import commands
client = commands.Bot(command_prefix="?")
client.botid = "798286010944585759"
@client.event
async def on_ready():
await client.change_presence(status=discord.Status.online, activity=discord.Game(name=f"Connected! Using this bot as a test!!"))
print(f"Ready!\nDiscord.py Version {discord.__version__}\nPython Version {sys.version}")
@client.event
async def on_message(ctx):
print(f'{ctx.author.id} {ctx.content.lower()}')
if ''.join([str(x) for x in banlist]) in ctx.content.lower():
await function.check(ctx)
try:
from code.token import token
client.run(token['token'])
except:
print(f"Uh oh! Something happened!\n\nThere was a token error!\n\nCheck code.token.token!")
exit()
keepalive()