the final committ. Fixes #28 #27 #17 #14 #6

This commit is contained in:
Luke Robles 2020-09-01 21:45:48 -07:00
parent b1b1cff6af
commit 53bff5a39d
3 changed files with 43 additions and 9 deletions

View File

@ -221,6 +221,23 @@ async def greentext(ctx):
)
)
@bot.command(name='wallpaper')
async def wallpaper(ctx):
import wallpaper
await ctx.send(embed=generate_embed(embed_url=wallpaper.get_wall(ctx.message.content)))
@bot.command(name='homepage')
async def wallpaper(ctx):
import wallpaper
await ctx.send(embed=generate_embed(embed_url=wallpaper.fcking_homepage()))
@bot.command(name='clap')
async def clap(ctx):
await ctx.send("{}".format(' :clap: '.join(ctx.message.content.split()[1:])))
@bot.command(name='birb')
async def birb(ctx):
import animals
@ -249,6 +266,31 @@ async def stock(ctx):
await ctx.send(embed=result)
@bot.command(name='tts')
async def tts(ctx):
import tts
if ctx.message.content.split()[1] == 'langs':
await ctx.send(
"Ok {}, check your DMs".format(ctx.message.author.mention)
)
return await ctx.message.author.send(tts.get_all_langs())
await ctx.send(
file=discord.File(
tts.text_to_speech(ctx.message.content),
filename="A Message From {}.mp3".format(ctx.message.author.name)
)
)
await ctx.message.delete()
os.remove('/tmp/memes.mp3')
@bot.command(name='issue')
async def issue(ctx):
import gitlab
await ctx.send(gitlab.parse_message(ctx.message))
@bot.command(name='source')
async def source(ctx):

View File

@ -26,9 +26,6 @@ def create_issue(title, description):
def parse_message(message):
if not role_check.is_admin(message.author.roles):
return 'You dont have permission to do that'
if len(message.content.split()) == 1:
return help_methods.get_help_message(method='issue')

View File

@ -51,11 +51,6 @@ def get_help_message(method):
'Returns a definiton of a word from urban dictionary',
'\nUsage: !define loli'
],
'minecraft': [
'Allows you to interact with the minecraft server.',
'You can do things like !minecraft logs, or !minecraft map',
' or !minecraft status to get information about the server'
],
'dog': [
'Returns the URL to a G O O D B O Y E or G I R L',
'\nUsage: !dog'
@ -172,7 +167,7 @@ def get_help_embed(bot):
categories = {
'fun': ['ffxiv', 'clap', 'redpanda', 'birb', 'youtube', 'dog', 'excuse', 'greentext', 'lewd', 'message', 'meme', 'homepage', 'pout', 'roll', 'smug', 'quake', 'wink',],
'util': ['corona', '8ball', 'decide', 'info', 'icon', 'wallpaper', 'stock', 'tts', 'issue'],
'users': ['help', 'invite', 'purge', 'roles', 'source', 'minecraft'],
'users': ['help', 'invite', 'purge', 'roles', 'source'],
'admin': ['emoji', 'cleanup']
}