Skip to content

Commit

Permalink
Merge pull request #1 from Ghalbeyou/Updated
Browse files Browse the repository at this point in the history
Better readme and better bot
  • Loading branch information
ilynivin authored Jun 6, 2023
2 parents 7316a71 + 20664b7 commit 6217ffa
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 11 deletions.
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# Xelyer the Joke Bot
<h1 align="center">Xelyer - The Joke Bot</h1>

## What is Xelyer ?
*Xelyer a simple joke bot build with discord.py . It uses JOKE Api to get some Jokes for you*
<p align="center">
<img src="https://cdn.discordapp.com/attachments/1101145432941404162/1111928467618025583/screen1.png" alt="Demo" width="300">
</p>

<img align="right" width="300" src="https://cdn.discordapp.com/attachments/1101145432941404162/1111928467618025583/screen1.png" alt="demo" />
<p align="center">Xelyer is a modern joke bot built with discord.py. It fetches jokes from the JOKE API to bring humor to your Discord server.</p>

## πŸ€– Add Xelyer to Your Discord Server

## How do i add Xelyer Bot ?
You can easily add Xelyer to your Discord server by clicking on the following link: [Add Xelyer to Your Server](https://discord.com/oauth2/authorize?client_id=1111316333666254878&permissions=534723950656&scope=bot)

- You can add Xelyer through this [Link](https://discord.com/oauth2/authorize?client_id=1111316333666254878&permissions=534723950656&scope=bot)
## 🌟 Contributing

We welcome contributions to make Xelyer even better! If you have any ideas, bug fixes, or feature enhancements, please check out our [contributing guidelines](CONTRIBUTING.md) for more information.

## Want to make this Small Joke bot to cool ?
## πŸ“ Feedback and Support

Contibute to this repo to make this simple joke bot into cool
If you have any questions, suggestions, or need support, feel free to open an issue on the GitHub repository.

- Please Read the [contributing.md](/~https://github.com/Xelyer/Xelyerbot/blob/main/CONTRIBUTING.md) for more info
---

<p align="center">Made with ❀️ by the Xelyer team</p>
17 changes: 15 additions & 2 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,23 @@ async def on_ready():


@bot.command()
async def joke(ctx):
async def joke(ctx: commands.Context):
embed = discord.Embed(
title="Joke!",
description="Please wait! I'm generating your joke ...",
color=discord.Color.random()
)
joke_msg = await ctx.send(embed=embed, content=f"{ctx.author.mention}")
response = requests.get("https://official-joke-api.appspot.com/random_joke")
joke = json.loads(response.text)
await ctx.send(f"{joke['setup']}\n{joke['punchline']}")
new_embed = discord.Embed(
title=f"{joke['setup']}",
description=f"{joke['punchline']}",
color=discord.Color.blurple()
)
await joke_msg.edit(embed=new_embed)
await joke_msg.add_reaction('πŸ˜‚')
await joke_msg.add_reaction('πŸ‘Ž')



Expand Down

0 comments on commit 6217ffa

Please sign in to comment.