Added BSD fortune command (currently samples only from computer fortunes)

This commit is contained in:
2026-04-20 06:55:21 +03:00
parent ced84bbd18
commit 38f80dbaf3
2 changed files with 5741 additions and 0 deletions
+5733
View File
File diff suppressed because it is too large Load Diff
+8
View File
@@ -255,6 +255,14 @@ async def on_message(message: nextcord.Message):
ongoing_races.pop(message.channel.id)
await message.channel.send(f"**Time's up!**\nThe answer was **{text}**.")
@bot.slash_command()
async def fortune(interaction: nextcord.Interaction):
await interaction.response.defer()
with open("fortune.txt") as f:
data = f.read()
data = data.split("\n%\n")
await interaction.send(f"```{random.choice(data)}```")
with open("token.txt") as f:
token = f.read()