-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into tts-commands
- Loading branch information
Showing
31 changed files
with
2,231 additions
and
1,078 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
Ignoring exception in view <QuestionVerificationUi timeout=120 children=1> for item <Button style=<ButtonStyle.primary: 1> url=None disabled=False label='Answer' emoji=None row=None>: | ||
Traceback (most recent call last): | ||
File "/home/container/.local/lib/python3.12/site-packages/nextcord/ui/view.py", line 386, in _scheduled_task | ||
await item.callback(interaction) | ||
File "/home/container/src/commands/verify/VerificationUis.py", line 178, in answer_button | ||
await interaction.response.send_modal(self.modal) | ||
File "/home/container/.local/lib/python3.12/site-packages/nextcord/interactions.py", line 1003, in send_modal | ||
await adapter.create_interaction_response( | ||
File "/home/container/.local/lib/python3.12/site-packages/nextcord/webhook/async_.py", line 200, in request | ||
raise HTTPException(response, data) | ||
nextcord.errors.HTTPException: 400 Bad Request (error code: 40060): Interaction has already been acknowledged. | ||
Traceback (most recent call last): | ||
|
||
File "/home/container/src/commands/minigames/ValorantQuizSession.py", line 154, in _next_round | ||
content_type, content, code, reason = await asyncget(f'{self.baseurl}/maps') | ||
^^^^^^^^^^^^ | ||
|
||
AttributeError: 'MapQuizSession' object has no attribute 'baseurl' | ||
|
||
Ignoring exception in view <QuizView timeout=0 children=4> for item <Button style=<ButtonStyle.secondary: 2> url=None disabled=False label='Skip' emoji=None row=None>: | ||
Traceback (most recent call last): | ||
File "/home/container/.local/lib/python3.12/site-packages/nextcord/ui/view.py", line 386, in _scheduled_task | ||
await item.callback(interaction) | ||
File "/home/container/src/commands/minigames/ValorantQuizUi.py", line 99, in skip | ||
await self.skip_callback(interaction) | ||
File "/home/container/src/commands/minigames/ValorantQuizSession.py", line 249, in on_player_skip | ||
await interaction.followup.send(embed=ErrorEmbed("You have already skipped this map or submitted an answer"), delete_after=5, ephemeral=True) | ||
File "/home/container/.local/lib/python3.12/site-packages/nextcord/webhook/async_.py", line 1568, in send | ||
data = await adapter.execute_webhook( | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
File "/home/container/.local/lib/python3.12/site-packages/nextcord/webhook/async_.py", line 198, in request | ||
raise NotFound(response, data) | ||
nextcord.errors.NotFound: 404 Not Found (error code: 10015): Unknown Webhook | ||
Ignoring exception in view <QuizView timeout=0 children=4> for item <Button style=<ButtonStyle.secondary: 2> url=None disabled=False label='Skip' emoji=None row=None>: | ||
Traceback (most recent call last): | ||
File "/home/container/.local/lib/python3.12/site-packages/nextcord/ui/view.py", line 386, in _scheduled_task | ||
await item.callback(interaction) | ||
File "/home/container/src/commands/minigames/ValorantQuizUi.py", line 99, in skip | ||
await self.skip_callback(interaction) | ||
File "/home/container/src/commands/minigames/ValorantQuizSession.py", line 249, in on_player_skip | ||
await interaction.followup.send(embed=ErrorEmbed("You have already skipped this map or submitted an answer"), delete_after=5, ephemeral=True) | ||
File "/home/container/.local/lib/python3.12/site-packages/nextcord/webhook/async_.py", line 1568, in send | ||
data = await adapter.execute_webhook( | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
File "/home/container/.local/lib/python3.12/site-packages/nextcord/webhook/async_.py", line 198, in request | ||
raise NotFound(response, data) | ||
nextcord.errors.NotFound: 404 Not Found (error code: 10015): Unknown Webhook | ||
Traceback (most recent call last): | ||
|
||
File "/home/container/src/commands/minigames/ValorantQuizSession.py", line 154, in _next_round | ||
content_type, content, code, reason = await asyncget(f'{self.baseurl}/maps') | ||
^^^^^^^^^^^^ | ||
|
||
AttributeError: 'MapQuizSession' object has no attribute 'baseurl' | ||
|
||
Traceback (most recent call last): | ||
|
||
File "/home/container/src/commands/minigames/ValorantQuizSession.py", line 154, in _next_round | ||
content_type, content, code, reason = await asyncget(f'{self.baseurl}/maps') | ||
^^^^^^^^^^^^ | ||
|
||
AttributeError: 'MapQuizSession' object has no attribute 'baseurl' | ||
|
||
Traceback (most recent call last): | ||
|
||
File "/home/container/src/commands/minigames/ValorantQuizSession.py", line 154, in _next_round | ||
content_type, content, code, reason = await asyncget(f'{self.baseurl}/maps') | ||
^^^^^^^^^^^^ | ||
|
||
AttributeError: 'MapQuizSession' object has no attribute 'baseurl' | ||
|
||
Traceback (most recent call last): | ||
|
||
File "/home/container/src/commands/minigames/ValorantQuizSession.py", line 154, in _next_round | ||
content_type, content, code, reason = await asyncget(f'{self.baseurl}/maps') | ||
^^^^^^^^^^^^ | ||
|
||
AttributeError: 'MapQuizSession' object has no attribute 'baseurl' | ||
|
||
Traceback (most recent call last): | ||
|
||
File "/home/container/src/commands/minigames/ValorantQuizSession.py", line 154, in _next_round | ||
content_type, content, code, reason = await asyncget(f'{self.baseurl}/maps') | ||
^^^^^^^^^^^^ | ||
|
||
AttributeError: 'MapQuizSession' object has no attribute 'baseurl' | ||
|
||
Traceback (most recent call last): | ||
|
||
File "/home/container/src/commands/minigames/ValorantQuizSession.py", line 154, in _next_round | ||
content_type, content, code, reason = await asyncget(f'{self.baseurl}/maps') | ||
^^^^^^^^^^^^ | ||
|
||
AttributeError: 'MapQuizSession' object has no attribute 'baseurl' | ||
|
||
Traceback (most recent call last): | ||
|
||
File "/home/container/src/commands/minigames/ValorantQuizSession.py", line 154, in _next_round | ||
content_type, content, code, reason = await asyncget(f'{self.baseurl}/maps') | ||
^^^^^^^^^^^^ | ||
|
||
AttributeError: 'MapQuizSession' object has no attribute 'baseurl' |
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
https://lyrist.vercel.app/api/BRANO/ARTISTA | ||
https://music.xianqiao.wang/neteaseapiv2/lyric?id=2005468260 | ||
https://music.xianqiao.wang/neteaseapiv2/search?limit=1&type=1&keywords=IMPORTANTE%20Marracash | ||
https://www.reddit.com/r/memes/new.json?sort=hot | ||
https://0x0.st/ | ||
https://api.textcaptcha.com/myemail@example.com.json | ||
https://apidocs.cheapshark.com/ | ||
https://www.freetogame.com/api-doc | ||
https://www.gamerpower.com/api-read | ||
https://cataas.com/ | ||
https://random-word-api.herokuapp.com/word?lang=it&number=2&length=5 | ||
https://sesh.fyi/timestamp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
To add a filter for certain loggers with specific names, you can create a custom `Filter` class and apply it to the desired loggers. | ||
|
||
Here's an example of how you can do this: | ||
```py | ||
class LoggerNameFilter(logging.Filter): | ||
def __init__(self, allowed_loggers=None): | ||
self.allowed_loggers = allowed_loggers if allowed_loggers else [] | ||
|
||
def filter(self, record): | ||
logger_name = record.name | ||
return logger_name in self.allowed_loggers | ||
|
||
# Create a filter for loggers named "my_app" and "another_app" | ||
my_filter = LoggerNameFilter(allowed_loggers=["my_app", "another_app"]) | ||
|
||
# Apply the filter to the desired loggers | ||
logger1 = getlogger("my_app") | ||
logger2 = getlogger("another_app") | ||
|
||
for logger in [logger1, logger2]: | ||
logger.addFilter(my_filter) | ||
``` | ||
In this example, we define a `LoggerNameFilter` class that takes an optional list of allowed logger names. The `filter()` method checks if the logger name matches one of the allowed names and returns `True` if it does, or `False` otherwise. | ||
|
||
We then create a filter instance with the desired allowed loggers and apply it to the two specific loggers (`logger1` and `logger2`) using the `addFilter()` method. | ||
|
||
Note that you can also use this filter class to filter out log messages from certain loggers by passing an empty list of allowed loggers. For example: | ||
```py | ||
my_filter = LoggerNameFilter(allowed_loggers=[]) | ||
``` | ||
This would prevent any log messages from being processed for loggers with names matching the allowed loggers. | ||
|
||
You can also use this filter class to filter out log messages based on other criteria, such as log levels or message contents. For example: | ||
```py | ||
class MessageContentFilter(logging.Filter): | ||
def __init__(self, allowed_message_contents=None): | ||
self.allowed_message_contents = allowed_message_contents if allowed_message_contents else [] | ||
|
||
def filter(self, record): | ||
return any(msg in record.msg for msg in self.allowed_message_contents) | ||
``` | ||
This `MessageContentFilter` class filters out log messages that do not contain specific message contents. You can apply this filter to a logger using the same `addFilter()` method. |
Oops, something went wrong.