forked from ilmango-ChikaP/Tip-Sugar
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtipsugar.py
38 lines (30 loc) · 922 Bytes
/
tipsugar.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
import traceback
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import discord
from discord.ext import commands
from config import TOKEN
COMMANDS = [
'info',
'help',
'balance',
'deposit',
'tip',
'withdraw',
'withdrawall'
]
class TipSugar(commands.Bot):
def __init__(self, command_prefix):
super().__init__(command_prefix)
for cog in COMMANDS:
try:
self.load_extension(cog)
except Exception:
traceback.print_exc()
async def on_ready(self):
print("Successful login.") # notify login completion on terminal
print("Name: " + str(self.user.name))
print("ID: " + str(self.user.id))
print("----------------------")
await self.change_presence(activity=discord.Game(name="//help")) # change game playing
bot = TipSugar(command_prefix='//')
bot.run(TOKEN)