mirror of
https://github.com/MrDetonia/Maki.git
synced 2024-11-22 03:44:18 -05:00
v1.0.1 - call discord_typing properly, minor formatting
This commit is contained in:
parent
d6e9e45ea3
commit
288a08ee1d
14
bot.py
14
bot.py
@ -43,14 +43,14 @@ client = discord.Client()
|
||||
@client.event
|
||||
@asyncio.coroutine
|
||||
def on_ready():
|
||||
# info on terminal
|
||||
print('Connected')
|
||||
print('User: ' + client.user.name)
|
||||
print('ID: ' + client.user.id)
|
||||
# info on terminal
|
||||
print('Connected')
|
||||
print('User: ' + client.user.name)
|
||||
print('ID: ' + client.user.id)
|
||||
|
||||
# set "Now Playing" to print version
|
||||
game = discord.Game(name = version)
|
||||
yield from client.change_presence(game=game)
|
||||
# set "Now Playing" to print version
|
||||
game = discord.Game(name = version)
|
||||
yield from client.change_presence(game=game)
|
||||
|
||||
|
||||
# called when message received
|
||||
|
@ -104,7 +104,7 @@ def cmd_sayy(client, msg):
|
||||
|
||||
@asyncio.coroutine
|
||||
def cmd_markov(client, msg):
|
||||
discord_typing(client, msg)
|
||||
yield from discord_typing(client, msg)
|
||||
|
||||
tmp = msg.content[8:]
|
||||
target = ""
|
||||
@ -161,7 +161,7 @@ def cmd_roll(client, msg):
|
||||
def cmd_qr(client, msg):
|
||||
tmp = msg.content[4:]
|
||||
|
||||
discord_typing(client, msg)
|
||||
yield from discord_typing(client, msg)
|
||||
|
||||
# generate qr code
|
||||
qr = subprocess.Popen("qrencode -t png -o -".split(), stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||
|
@ -13,7 +13,7 @@ import json
|
||||
|
||||
|
||||
# bot version
|
||||
version = "v1.0.0"
|
||||
version = "v1.0.1"
|
||||
|
||||
|
||||
# TODO: generate this on the fly and make it look acceptable
|
||||
@ -42,8 +42,8 @@ admins = ['116883900688629761']
|
||||
# log of users' last messages and timestamps
|
||||
history = {}
|
||||
if os.path.isfile('hist.json'):
|
||||
with open('hist.json', 'r') as fp:
|
||||
history = json.load(fp)
|
||||
with open('hist.json', 'r') as fp:
|
||||
history = json.load(fp)
|
||||
|
||||
# quiet modes
|
||||
quiet = {}
|
||||
|
Loading…
Reference in New Issue
Block a user