Compare commits

...

2 Commits

Author SHA1 Message Date
de4369afb0 todo 2025-01-07 00:43:16 +01:00
47b349322b random 2025-01-07 00:42:28 +01:00
2 changed files with 16 additions and 1 deletions

View File

@ -1,8 +1,11 @@
# ToDo
- [ ] Wikipedia speedrun timer a leaderboard
# Token Security
- [ ] how to import it
# Docs by
- [Discrod.py](https://discordpy.readthedocs.io/en/stable/index.html)
- [Wikiipedia.py](ttps://wikipedia.readthedocs.io/en/latest/code.html)
- [Wikipedia.py](ttps://wikipedia.readthedocs.io/en/latest/code.html)

View File

@ -63,4 +63,16 @@ async def search(ctx, search: Option(str, description = "What do you want to get
@bot.slash_command(guild_ids=g_ids, name = "random", description="Returns a random Wikipedia article")
async def search(ctx):
await ctx.channel.trigger_typing() # shows that bot is typing
ran_article = wikipedia.random().replace(" ", "_").replace(" ", "_")
try:
await ctx.respond(f"https://en.wikipedia.org/wiki/{ran_article}")
except:
await ctx.send(f"https://en.wikipedia.org/wiki/{ran_article}")
bot.run("MTMyNTk1Mzg4OTcyNzQxNDM0Mw.G2Tgo0.2OhbgaVYhys0BhxJMVgGDnG0W5qvxH-soJML3M")