Skip to content
Extraits de code Groupes Projets
Valider 592c6398 rédigé par Elliu's avatar Elliu
Parcourir les fichiers

Fixes on displaying help

parent c8465440
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -29,7 +29,7 @@ class Entry: ...@@ -29,7 +29,7 @@ class Entry:
self.totalimgs = 0 self.totalimgs = 0
subreddits['kumiko'] = Entry('kumiko', 'rarekumikos') subreddits['kumiko'] = Entry('kumiko', 'rarekumikos')
subreddits['araragi'] = Entry('araragi', 'araragi') #subreddits['araragi'] = Entry('araragi', 'araragi')
subreddits['hitagi'] = Entry('hitagi', 'Senjougahara') subreddits['hitagi'] = Entry('hitagi', 'Senjougahara')
...@@ -42,7 +42,7 @@ def refresh_posts(entry): ...@@ -42,7 +42,7 @@ def refresh_posts(entry):
entry.posturls.clear() entry.posturls.clear()
entry.totalimgs=0 entry.totalimgs=0
i=0 i=0
for submission in entry.subreddit.hot(limit=500): for submission in entry.subreddit.hot(limit=50):
#_ = os.system('clear') #_ = os.system('clear')
i = i + 1 i = i + 1
entry.totalimgs = entry.totalimgs + 1 entry.totalimgs = entry.totalimgs + 1
...@@ -83,10 +83,10 @@ async def on_message(message): ...@@ -83,10 +83,10 @@ async def on_message(message):
return return
if message.content.lower() == "show me a help": if message.content.lower() == "show me a help":
mess = "Usage : ``show me a xxxx``\nCurrently, I can show :```" mess = "Usage : ``show me a xxxx``\nCurrently, I can show :```"
for entry in subreddits.key(): for entry in subreddits.values():
str(entry.name) + " with a picture from r/" + str(entry.subName) + "\n" mess += entry.name + " with a picture from r/" + entry.subName + "\n"
"```" mess += "```"
await message.channel.send("") await message.channel.send(mess)
if "show me a" in message.content.lower(): if "show me a" in message.content.lower():
name = re.search(r"show me a ([\S]+)", message.content.lower()) name = re.search(r"show me a ([\S]+)", message.content.lower())
if name == None: if name == None:
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter