1
0
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:
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 @client.event
@asyncio.coroutine @asyncio.coroutine
def on_ready(): def on_ready():
# info on terminal # info on terminal
print('Connected') print('Connected')
print('User: ' + client.user.name) print('User: ' + client.user.name)
print('ID: ' + client.user.id) print('ID: ' + client.user.id)
# set "Now Playing" to print version # set "Now Playing" to print version
game = discord.Game(name = version) game = discord.Game(name = version)
yield from client.change_presence(game=game) yield from client.change_presence(game=game)
# called when message received # called when message received

View File

@ -104,7 +104,7 @@ def cmd_sayy(client, msg):
@asyncio.coroutine @asyncio.coroutine
def cmd_markov(client, msg): def cmd_markov(client, msg):
discord_typing(client, msg) yield from discord_typing(client, msg)
tmp = msg.content[8:] tmp = msg.content[8:]
target = "" target = ""
@ -161,7 +161,7 @@ def cmd_roll(client, msg):
def cmd_qr(client, msg): def cmd_qr(client, msg):
tmp = msg.content[4:] tmp = msg.content[4:]
discord_typing(client, msg) yield from discord_typing(client, msg)
# generate qr code # generate qr code
qr = subprocess.Popen("qrencode -t png -o -".split(), stdin=subprocess.PIPE, stdout=subprocess.PIPE) qr = subprocess.Popen("qrencode -t png -o -".split(), stdin=subprocess.PIPE, stdout=subprocess.PIPE)

View File

@ -13,7 +13,7 @@ import json
# bot version # bot version
version = "v1.0.0" version = "v1.0.1"
# TODO: generate this on the fly and make it look acceptable # TODO: generate this on the fly and make it look acceptable
@ -42,8 +42,8 @@ admins = ['116883900688629761']
# log of users' last messages and timestamps # log of users' last messages and timestamps
history = {} history = {}
if os.path.isfile('hist.json'): if os.path.isfile('hist.json'):
with open('hist.json', 'r') as fp: with open('hist.json', 'r') as fp:
history = json.load(fp) history = json.load(fp)
# quiet modes # quiet modes
quiet = {} quiet = {}