-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (23 loc) · 803 Bytes
/
Copy pathmain.py
File metadata and controls
29 lines (23 loc) · 803 Bytes
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
import discord
from discord.ext import commands
import os
try:
arquivo = open("blacklist.json", 'r+')
except FileNotFoundError:
arquivo = open("blacklist.json", 'w+')
arquivo.writelines('{}')
arquivo.close()
intents = discord.Intents.default()
intents.members = True
testing = False
client = commands.Bot(command_prefix = "-", case_insensitive = True, intents=intents)
client.remove_command('help')
@client.event
async def on_ready():
print('Entramos como {0.user}'.format(client))
await client.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name="músicas"))
for filename in os.listdir('./cogs'):
if filename.endswith('.py'):
client.load_extension(f'cogs.{filename[:-3]}')
apikey = open("api.env", "r").readline()
client.run(apikey)