-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSubmoon.py
More file actions
33 lines (24 loc) · 831 Bytes
/
Submoon.py
File metadata and controls
33 lines (24 loc) · 831 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
30
31
32
import discord
from discord.ext import commands
import sbs_tokens as token
import sbs_ids as sbsid
### invite Submoon: https://discordapp.com/oauth2/authorize?client_id=632130020495589376&scope=bot&permissions=8 ###
description = '''Substarters' bot Submoon.'''
bot = commands.Bot(command_prefix='!', description=description)
### General bot stuff ###
@bot.event
async def on_ready():
print(bot.user.name + ' is running.')
@bot.event
async def on_command_error(ctx, error):
if isinstance(discord.ext.commands.errors.CommandNotFound):
pass
### Subcommands ###
def getText(name):
with open("text/{}.txt".format(name), encoding="utf8") as f:
return f.read()
# Add stuff here
@bot.command(help="Say hello.")
async def hello(ctx):
await ctx.send(getText("hellomoon"))
bot.run(token.Submoon)