-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSubsolar.py
More file actions
31 lines (24 loc) · 832 Bytes
/
Subsolar.py
File metadata and controls
31 lines (24 loc) · 832 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
import discord
from discord.ext import commands
import sbs_tokens as token
import sbs_ids as sbsid
### invite Subsolar: https://discordapp.com/oauth2/authorize?client_id=632130255427207178&scope=bot&permissions=8 ###
description = '''Substarters' bot Subsolar.'''
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()
# Say hello
@bot.command(help="Say hello.")
async def hello(ctx):
await ctx.send(getText("hellosolar"))
bot.run(token.Subsolar)