update subreddit + fix error meme for slash commands
This commit is contained in:
parent
65c01f47bd
commit
6776f34d11
1 changed files with 4 additions and 3 deletions
|
@ -32,9 +32,9 @@ class Internet(commands.Cog):
|
||||||
if args: # s'il y a un subreddit de défini
|
if args: # s'il y a un subreddit de défini
|
||||||
subredditchoix = args
|
subredditchoix = args
|
||||||
else: # s'il n'y en a pas
|
else: # s'il n'y en a pas
|
||||||
subredditchoix = choice(['memes', 'anime_irl', 'goodanimemes', 'BikiniclienttomTwitter', 'dankmemes', 'DeepFried',
|
subredditchoix = choice(['memes', 'goodanimemes', 'BikiniclienttomTwitter', 'dankmemes', 'DeepFried',
|
||||||
'educationalmemes', 'funny', 'marvelmemes', 'me_irl', 'meme', 'MemeEconomy', 'Memes_Of_The_Dank', 'MinecraftMemes',
|
'educationalmemes', 'funny', 'marvelmemes', 'me_irl', 'meme', 'MemeEconomy', 'Memes_Of_The_Dank', 'MinecraftMemes',
|
||||||
'physicsmemes', 'reactiongifs', 'blackpeopletwitter', 'metal_me_irl', 'bee_irl', '195', 'shittyadviceanimals', 'meirl',
|
'physicsmemes', 'blackpeopletwitter', 'metal_me_irl', '195', 'shittyadviceanimals', 'meirl',
|
||||||
'2meirl4meirl', 'AdviceAnimals', 'weirdmemes'])
|
'2meirl4meirl', 'AdviceAnimals', 'weirdmemes'])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -59,6 +59,7 @@ class Internet(commands.Cog):
|
||||||
|
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
print(f"Error in _memes command = args: {args}, subreddit: {subredditchoix}, error: {error}")
|
print(f"Error in _memes command = args: {args}, subreddit: {subredditchoix}, error: {error}")
|
||||||
|
if fromSlash != True:
|
||||||
await ctx.message.add_reaction(emoji = '❌')
|
await ctx.message.add_reaction(emoji = '❌')
|
||||||
return await ctx.send(f"Ce subreddit est interdit, mis en quarantaine ou n'existe pas. ({subredditchoix})")
|
return await ctx.send(f"Ce subreddit est interdit, mis en quarantaine ou n'existe pas. ({subredditchoix})")
|
||||||
@cog_ext.cog_slash(name="meme", description = "Envoie un meme de reddit.")
|
@cog_ext.cog_slash(name="meme", description = "Envoie un meme de reddit.")
|
||||||
|
|
Reference in a new issue