mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Various fixes
This commit is contained in:
parent
45e5886282
commit
1763c76d69
@ -113,7 +113,7 @@ def createEmptyFiles():
|
|||||||
print("Now enter the imgflip password.")
|
print("Now enter the imgflip password.")
|
||||||
imgflip_password = input(">")
|
imgflip_password = input(">")
|
||||||
if imgflip_username == "": imgflip_username = "USERNAMEHERE"
|
if imgflip_username == "": imgflip_username = "USERNAMEHERE"
|
||||||
if imgflip_password == "": password = "PASSWORDHERE"
|
if imgflip_password == "": imgflip_password = "PASSWORDHERE"
|
||||||
print("\n!imdb configuration. Get your token here http://www.myapifilms.com/token.do\nOr just press enter if you're not interested.")
|
print("\n!imdb configuration. Get your token here http://www.myapifilms.com/token.do\nOr just press enter if you're not interested.")
|
||||||
imdb_token = input(">")
|
imdb_token = input(">")
|
||||||
if imdb_token == "": imdb_token = "TOKENHERE"
|
if imdb_token == "": imdb_token = "TOKENHERE"
|
||||||
|
|||||||
26
red.py
26
red.py
@ -45,7 +45,7 @@ help = """**Commands list:**
|
|||||||
!gif [text] - GIF search
|
!gif [text] - GIF search
|
||||||
!imdb - Retrieves a movie's information from IMDB using its title
|
!imdb - Retrieves a movie's information from IMDB using its title
|
||||||
!urban [text] - Search definitions in the urban dictionary
|
!urban [text] - Search definitions in the urban dictionary
|
||||||
!memes [ID;Text1;Text2] - Create a meme
|
!meme [ID;Text1;Text2] - Create a meme
|
||||||
!customcommands - Custom commands' list
|
!customcommands - Custom commands' list
|
||||||
!addcom [command] [text] - Add a custom command
|
!addcom [command] [text] - Add a custom command
|
||||||
!editcom [command] [text] - Edit a custom command
|
!editcom [command] [text] - Edit a custom command
|
||||||
@ -107,11 +107,11 @@ audio_help = """
|
|||||||
4) Listen to it with !play [playlist_name]!
|
4) Listen to it with !play [playlist_name]!
|
||||||
"""
|
"""
|
||||||
meme_help = """
|
meme_help = """
|
||||||
To create individual memes you need an account on https://imgflip.com/ , just create an account and add the username and the password in the json/apis file.
|
Usage example:
|
||||||
If you want more memes, go on the website https://imgflip.com/memetemplates and choice a meme and click on "Blank Template" then add the ID
|
|
||||||
One-Does-Not-Simply Template ID: 61579
|
One-Does-Not-Simply Template ID: 61579
|
||||||
!memes 61579;Test;Test
|
!meme 61579;Test;Test
|
||||||
|
|
||||||
|
Memes list:
|
||||||
ID Name
|
ID Name
|
||||||
61579 One Does Not Simply
|
61579 One Does Not Simply
|
||||||
438680 Batman Slapping Robin
|
438680 Batman Slapping Robin
|
||||||
@ -157,6 +157,9 @@ ID Name
|
|||||||
101711 Skeptical Baby
|
101711 Skeptical Baby
|
||||||
101716 Yo Dawg Heard You
|
101716 Yo Dawg Heard You
|
||||||
101511 Dont You Squidward
|
101511 Dont You Squidward
|
||||||
|
|
||||||
|
For more memes: `https://imgflip.com/memetemplates`
|
||||||
|
Choose a meme, click on "Blank Template" then add the ID
|
||||||
"""
|
"""
|
||||||
|
|
||||||
admin_help = """
|
admin_help = """
|
||||||
@ -263,11 +266,11 @@ async def on_message(message):
|
|||||||
await uptime(message)
|
await uptime(message)
|
||||||
elif message.content.startswith('!avatar'):
|
elif message.content.startswith('!avatar'):
|
||||||
await avatar(message)
|
await avatar(message)
|
||||||
elif message.content.startswith ('!memes'):
|
elif message.content == '!meme help' or message.content == '!memes':
|
||||||
await memes(message)
|
|
||||||
elif message.content == '!meme help':
|
|
||||||
await client.send_message(message.author, meme_help)
|
await client.send_message(message.author, meme_help)
|
||||||
await client.send_message(message.channel, "{} `Check your DMs for the meme help.`".format(message.author.mention))
|
await client.send_message(message.channel, "{} `Check your DMs for !meme help.`".format(message.author.mention))
|
||||||
|
elif message.content.startswith ('!meme'):
|
||||||
|
await memes(message)
|
||||||
################## music #######################
|
################## music #######################
|
||||||
elif message.content == "!sing":
|
elif message.content == "!sing":
|
||||||
await playPlaylist(message, sing=True)
|
await playPlaylist(message, sing=True)
|
||||||
@ -998,7 +1001,6 @@ async def imdb(message): # Method added by BananaWaffles.
|
|||||||
await client.send_message(message.channel, "$imdb [text]")
|
await client.send_message(message.channel, "$imdb [text]")
|
||||||
|
|
||||||
async def memes(message):
|
async def memes(message):
|
||||||
msg = message.content.split()
|
|
||||||
msg = message.content[6:]
|
msg = message.content[6:]
|
||||||
msg = msg.split(";")
|
msg = msg.split(";")
|
||||||
if apis["IMGFLIP_USERNAME"] == "USERNAMEHERE" or apis["IMGFLIP_PASSWORD"] == "PASSWORDHERE":
|
if apis["IMGFLIP_USERNAME"] == "USERNAMEHERE" or apis["IMGFLIP_PASSWORD"] == "PASSWORDHERE":
|
||||||
@ -1017,9 +1019,9 @@ async def memes(message):
|
|||||||
error = result["error_message"]
|
error = result["error_message"]
|
||||||
await client.send_message(message.channel, error)
|
await client.send_message(message.channel, error)
|
||||||
else:
|
else:
|
||||||
await client.send_message(message.channel, "!memes id;text1;text2")
|
await client.send_message(message.channel, "!meme id;text1;text2")
|
||||||
else:
|
else:
|
||||||
await client.send_message(message.channel, "!memes id;text1;text2")
|
await client.send_message(message.channel, "!meme id;text1;text2")
|
||||||
|
|
||||||
async def urban(message):
|
async def urban(message):
|
||||||
msg = message.content.split()
|
msg = message.content.split()
|
||||||
@ -1912,7 +1914,7 @@ def loadDataFromFiles(loadsettings=False):
|
|||||||
logger.info("Loaded " + str(len(twitchStreams)) + " streams to monitor.")
|
logger.info("Loaded " + str(len(twitchStreams)) + " streams to monitor.")
|
||||||
|
|
||||||
apis = dataIO.fileIO("json/apis.json", "load")
|
apis = dataIO.fileIO("json/apis.json", "load")
|
||||||
logger.info("Loaded " + str(len(apis) // 2 ) + " APIs.")
|
logger.info("Loaded APIs configuration.")
|
||||||
|
|
||||||
if loadsettings:
|
if loadsettings:
|
||||||
global settings
|
global settings
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user