1
0
mirror of https://github.com/MrDetonia/Maki.git synced 2024-11-25 12:40:46 -05:00

v1.0.1 - call discord_typing properly, minor formatting

This commit is contained in:
MrDetonia 2017-05-10 11:04:36 +00:00
parent d6e9e45ea3
commit 288a08ee1d
3 changed files with 12 additions and 12 deletions

14
bot.py
View File

@ -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

View File

@ -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)

View File

@ -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 = {}