Skip to content

Commit

Permalink
v0.6.2-beta
Browse files Browse the repository at this point in the history
Merge pull request #34 from Hamziee/dev
  • Loading branch information
Hamziee authored Aug 10, 2024
2 parents cbbe4b0 + 4ec710b commit 07eb48c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ The following versions will receive security updates as needed:

| Version | Supported |
| ------------ | ------------------ |
| 0.6.1-beta | :white_check_mark: |
| < 0.6.1-beta | :x: |
| 0.6.2-beta | :white_check_mark: |
| < 0.6.2-beta | :x: |

## Reporting a Vulnerability

Expand Down
2 changes: 2 additions & 0 deletions commands/kiss.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Thanks to Hamzie API for their unlimited free use of their API.

import discord
from discord.ext import commands
from discord import app_commands
Expand Down
19 changes: 12 additions & 7 deletions commands/ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,21 @@ async def ping(self, interaction: discord.Interaction):
embed.set_footer(text=f"Ava | version: {config.AVA_VERSION}", icon_url=config.FOOTER_ICON)
await interaction.response.send_message(embed=embed)
end = time.time()
startapi = time.time()
async with httpx.AsyncClient() as client:
response = await client.get("https://api.hamzie.site/v1/gifs/hug")
response.raise_for_status()
endapi = time.time()
duration = round((end - start) * 100)
durationapi = round((endapi - startapi) * 100)
durationtext = f"{duration}ms"
try:
startapi = time.time()
async with httpx.AsyncClient() as client:
response = await client.get("https://api.hamzie.sitea/v1/gifs/hug")
response.raise_for_status()
endapi = time.time()
durationapi = round((endapi - startapi) * 100)
durationapitext = f"{durationapi}ms"
except:
durationapitext = "No Response"
embed = discord.Embed(
title="Pong!",
description=f"Discord API & Ava Latency: {duration}ms.\nHamzie API Latency: {durationapi}ms. \n\n**What does this mean?**\nLatency is calculated to measure the responsiveness and performance of the bot and the Discord server. It helps users assess the speed at which the bot can send and receive messages, providing valuable feedback on its operational efficiency. \n\nThis information is crucial for bot developers and users to ensure that the bot is functioning optimally and to identify any potential issues that may affect its performance.",
description=f"Discord API & Ava Latency: {durationtext}\nHamzie API Latency: {durationapitext} \n\n**What does this mean?**\nLatency is calculated to measure the responsiveness and performance of the bot and the Discord server. It helps users assess the speed at which the bot can send and receive messages, providing valuable feedback on its operational efficiency. \n\nThis information is crucial for bot developers and users to ensure that the bot is functioning optimally and to identify any potential issues that may affect its performance.",
color=discord.Color.blurple())
embed.set_footer(text=f"Ava | version: {config.AVA_VERSION}", icon_url=config.FOOTER_ICON)
await interaction.edit_original_response(embed=embed)
Expand Down
2 changes: 1 addition & 1 deletion ex_config (change me to config.py).py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AVA_VERSION = 'v0.6.1-beta' # Do not change this, it will help with troubleshooting later
AVA_VERSION = 'v0.6.2-beta' # Do not change this, it will help with troubleshooting later
CONFIG_VERSION = 3 # Do not change this, it will help with troubleshooting later

# Required Bot Configuration
Expand Down
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Ava is a versatile, open-source Discord bot designed to effortlessly meet all yo
## Contributing
We welcome contributions to enhance Ava's functionality. Feel free to fork the repository, make your changes, and submit a pull request.

## Credits
- **Hamzie API** for delivering most images Ava uses. (Free to use for everyone)

## License
Ava is licensed under the [BSD 3-Clause](https://github.com/Hamziee/Ava/blob/main/LICENSE), allowing for free use and modification; but requires our copyright to be included and our names not be used.

Expand Down

0 comments on commit 07eb48c

Please sign in to comment.