wop commited on
Commit
99d64f1
1 Parent(s): b9a119d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +35 -0
app.py CHANGED
@@ -54,6 +54,41 @@ async def uptime(ctx):
54
 
55
  await ctx.send(embed=embed)
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  async def update_status():
58
  await bot.wait_until_ready() # Wait until the bot is fully ready
59
  while True:
 
54
 
55
  await ctx.send(embed=embed)
56
 
57
+ @bot.command()
58
+ async def verse(ctx):
59
+ """Returns a random Bible verse."""
60
+ # Fetch a random Bible verse
61
+ bible_api_url = "https://labs.bible.org/api/?passage=random&type=json"
62
+ response = requests.get(bible_api_url)
63
+ if response.status_code == 200:
64
+ verse = response.json()[0]
65
+ passage = f"{verse['bookname']} {verse['chapter']}:{verse['verse']} - {verse['text']}"
66
+ else:
67
+ passage = "Unable to fetch Bible verse"
68
+
69
+ # Create an embed
70
+ embed = discord.Embed(title="Random Bible Verse", description=passage, color=discord.Color.blue())
71
+ embed.set_footer(text="Created by Cosmos")
72
+ await ctx.send(embed=embed)
73
+
74
+ @bot.command()
75
+ async def cmds(ctx):
76
+ """Returns a list of commands and bot information."""
77
+ # Get list of commands
78
+ command_list = [f"{command.name}: {command.help}" for command in bot.commands]
79
+
80
+ # Get bot information
81
+ bot_info = f"Bot Name: {bot.user.name}\nBot ID: {bot.user.id}"
82
+
83
+ # Create an embed
84
+ embed = discord.Embed(title="Bot Information and Commands", color=discord.Color.blue())
85
+ embed.set_thumbnail(url=bot.user.avatar_url) # Set bot's profile picture as thumbnail
86
+ embed.add_field(name="Commands", value="\n".join(command_list), inline=False)
87
+ embed.add_field(name="Bot Information", value=bot_info, inline=False)
88
+ embed.set_footer(text="Created by Cosmos")
89
+
90
+ await ctx.send(embed=embed)
91
+
92
  async def update_status():
93
  await bot.wait_until_ready() # Wait until the bot is fully ready
94
  while True: