mirror of
https://github.com/MrDetonia/Maki.git
synced 2024-11-26 04:57:18 -05:00
Added .say command, minor changes, v0.7.0
This commit is contained in:
parent
102b4bee2b
commit
57bd0c94b2
12
bot.py
12
bot.py
@ -12,7 +12,6 @@ import os
|
|||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
import json
|
import json
|
||||||
from collections import namedtuple
|
|
||||||
|
|
||||||
# file in this directory called "secret.py" should contain these variables
|
# file in this directory called "secret.py" should contain these variables
|
||||||
from secret import email,pwd
|
from secret import email,pwd
|
||||||
@ -24,7 +23,7 @@ from secret import email,pwd
|
|||||||
name = "Maki"
|
name = "Maki"
|
||||||
|
|
||||||
# bot version
|
# bot version
|
||||||
version = "v0.6.2"
|
version = "v0.7.0"
|
||||||
|
|
||||||
# text shown by .help command
|
# text shown by .help command
|
||||||
helptext = """I am a bot written in Python by MrDetonia
|
helptext = """I am a bot written in Python by MrDetonia
|
||||||
@ -35,8 +34,9 @@ My commands are:
|
|||||||
.bots - prints basic info
|
.bots - prints basic info
|
||||||
.source - show a link to my source
|
.source - show a link to my source
|
||||||
.whoami - displays your user info
|
.whoami - displays your user info
|
||||||
.welcome <message> - set your welcome message
|
.welcome <message> - set your own welcome message
|
||||||
.seen <user> - prints when user was last seen
|
.seen <user> - prints when user was last seen
|
||||||
|
.say <msg> - say something
|
||||||
```"""
|
```"""
|
||||||
|
|
||||||
# IDs of admin users
|
# IDs of admin users
|
||||||
@ -65,7 +65,7 @@ if os.path.isfile('welcomes.json'):
|
|||||||
with open('welcomes.json', 'r') as fp:
|
with open('welcomes.json', 'r') as fp:
|
||||||
welcomes = json.load(fp)
|
welcomes = json.load(fp)
|
||||||
|
|
||||||
# this instance of a Discord client
|
# this instance of the Discord client
|
||||||
client = discord.Client()
|
client = discord.Client()
|
||||||
|
|
||||||
|
|
||||||
@ -167,6 +167,10 @@ def on_message(message):
|
|||||||
# user not logged
|
# user not logged
|
||||||
yield from client.send_message(message.channel, 'user not seen yet')
|
yield from client.send_message(message.channel, 'user not seen yet')
|
||||||
|
|
||||||
|
elif message.content.startswith('.say'):
|
||||||
|
# echo message
|
||||||
|
yield from client.send_message(message.channel, message.content[5:])
|
||||||
|
|
||||||
# Ben meme trackers
|
# Ben meme trackers
|
||||||
elif '/ck/' in message.content and message.author.name == "Ben.H":
|
elif '/ck/' in message.content and message.author.name == "Ben.H":
|
||||||
bentrack['ck'] += 1
|
bentrack['ck'] += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user