-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
87 temp voice #124
Open
NimVrod
wants to merge
8
commits into
master
Choose a base branch
from
87-temp-voice
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
87 temp voice #124
Conversation
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
Creates a voice channel in the same category as ctx, Every [delete_after] checks if there are any users in it if not deletes the channel
Heryin
reviewed
Dec 5, 2024
async def create(self, ctx: commands.Context, delete_after: int = 30): | ||
|
||
try: | ||
vc = await ctx.guild.create_voice_channel(name=f"Temp Voice Channel {datetime.datetime.now().strftime('%H:%m')}", category=ctx.channel.category) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
datetime.datetime.now().strftime('%H:%m')
Zwraca złą godzinę, zmień .now()
na .today()
oraz %m
na %M
Heryin
requested changes
Dec 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Jakaś forma detekcji co godzinę czy istnieją tymczasowe kanały głosowe które są już po czasie, np. w przypadku restartu bota lub utraty połączenia z Discordem (uwaga na strefy czasowe, zmianę dat itp. https://docs.nextcord.dev/en/stable/ext/tasks/index.html
- Komunikat o ręcznym usunięciu kanału następuje dopiero po jego usunięciu, więc komunikat odnosi się do nieistniejącego kanału i skutkuje w
Usunięto #unknown
- Ręczne usunięcie kanału nie usuwa istniejącego timera i po upływie czasu próbuje usunąć nieistniejący kanał z błędem 404
- Komunikat o usunięciu kanału po x czasu ma w formule
60*delete_after
zamiast po prostudelete_after
, co skutkuje właściwym czasem usunięcia, ale ilością minut we wiadomości zwiększoną 60-krotnie - Help do check_permission
- Może jakieś ograniczenie do np. 1 kanału na użytkownika, można dodać nazwę twórcy kanału na końcu jego nazwy
- Timer nie jest odnawiany jeśli na kanale ktoś jest w momencie, w którym oryginalny czas minie (możliwe, że mój test nie był dokładny i to jednak działa)
Changed datetime.now to datetime.today Changed ctx.send to ctx.reply Fixed time issue in reply Added an on_ready check for empty tempvoices in case of bot being offline Added functions in prepartion of adding limits of number of channels for users
1 channel per user can be created at a time Removed unneeded functions
Moved finding a user_id from channel_id to a separate function
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Wykonano #87
Tworzenie kanałów na czas określony przez użytkownika (domyślnie 30 minut), kanał jest usuwany tylko wtedy gdy nie ma na nim żadnego użytkownika
Usuwanie tymczasowego kanału komendą
Sprawdzanie permisji do tworzenia kanałów