-
Notifications
You must be signed in to change notification settings - Fork 0
/
rewrite.py
executable file
·58 lines (43 loc) · 1.62 KB
/
rewrite.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
from nextcord.ext import commands
from nextcord import Intents
import json
import logging
import checks
with open('config.JSON') as config_file:
config = json.load(config_file)
lance = 187028470998499340
logging.basicConfig(level=logging.INFO)
intents = Intents.default()
intents.members = True
description = '''Discord bot by Lance. Psuedo-baby style??\nUse !help <command> for instructions!'''
bot = commands.Bot(command_prefix = '!', description = description, case_insensitive = True, owner_id = lance, intents=intents)
#-------------Cogs-------------
# Cogs are an organizational system. This File is technically the bot,
# but all of its features are coded with cogs.
cogs = ['cogs.development',
'cogs.chat',
# 'cogs.hangman',
'cogs.ONUW']
# On bot launch
@bot.event
async def on_ready():
print('Logged in as ' + bot.user.name)
# bot.remove_command('help')
for cog in cogs:
bot.load_extension(cog)
return
#---------------------------------------DEVELOPMENT TOOLS---------------------------------------------
################## THIS HAS BEEN MOVED TO "development.py" ###########################
# @bot.command(hidden = True)
# @commands.is_owner()
# async def unload(ctx, *, module: str):
# """Unloads a module."""
# try:
# bot.unload_extension(module)
# except Exception as e:
# await ctx.send('\N{PISTOL}')
# await ctx.send('{}: {}'.format(type(e).__name__, e))
# else:
# await cts.send('\N{OK HAND SIGN}')
#---------------------------------------IGNORE-------------------------------------------------
bot.run(config['token'])