GitHub Actions run 12313744958 succeeded.
#dev-log
1 messages ยท Page 27 of 1
GitHub Actions run 12322769563 succeeded.
GitHub Actions run 12330027038 succeeded.
GitHub Actions run 12331189214 succeeded.
GitHub Actions run 12339852036 succeeded.
from keep_alive import keep_alive
import threading
import time
import os
import discord
from discord.ext import commands
import random
import asyncio
from dotenv import load_dotenv
import logging
from enum import Enum, auto
from googletrans import Translator
import json
import aiofiles
from datetime import datetime
Configuraciรณn de logging
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(levelname)s: %(message)s",
handlers=[
logging.FileHandler("bot.log...
[python-discord/sir-robin] New branch created: bharadwaj-raju-patch-aoc-join-command-message
7988ead &aoc join -> /aoc join in the error message - bharadwaj-raju
The join command is actually a slash command, but the bot tells people to do &aoc join, and it ends up just not working. I've seen lots of people run into this; [most recent example](#aoc-bot-commands message).
I've never worked on Discord bots so I'm not sure if this is the correct way to show slash commands (like the way it was {Bot.prefix} instead of just a literal ampersand), but either way it needs correction.
GitHub Actions run 12370663056 failed.
[python-discord/sir-robin] Checks Successful on PR: #138 &aoc join -> /aoc join in the error message
GitHub Actions run 12370713292 succeeded.
GitHub Actions run 12372635814 succeeded.
LGTM.
I'm not sure if this is the correct way to show slash commands (like the way it was {Bot.prefix} instead of just a literal ampersand
AFAIK, short of creating a constant, say, SLASH_PREFIX (which may help with searchability), what you've done looks fine to me.
61800ee &aoc join -> /aoc join in the error message (#138) - bharadwaj-raju
[python-discord/sir-robin] branch deleted: bharadwaj-raju-patch-aoc-join-command-message
Connected!
GitHub Actions run 12378497263 succeeded.
GitHub Actions run 12381340751 succeeded.
GitHub Actions run 12384478826 succeeded.
GitHub Actions run 12413210061 succeeded.
GitHub Actions run 12416961631 succeeded.
GitHub Actions run 12426365807 succeeded.
GitHub Actions run 12430175981 succeeded.
[python-discord/snekbox] New branch created: shenanigansd-patch-1
7d5eb24 Add plotly to eval deps - shenanigansd
6188677 Add kaleido==0.1.* to snekbox - swfarnsworth
Would be nice to sort these
7893523 Alphabetize dependencies - shenanigansd
78935236270f83de9b1692e91620bd259e6c313d
fd45a48 Bump coverallsapp/github-action (#224) - dependabot[bot]
[python-discord/snekbox] New branch created: bump-python-version
[python-discord/snekbox] New branch created: bump-dep-versions
will manually rebase and raise once other prs are merged
[python-discord/snekbox] branch deleted: bump-dep-versions
[python-discord/snekbox] branch deleted: bump-python-version
[python-discord/snekbox] New branch created: bump-base-builder-version
281bbd0 Bump builder base from 3.12 to 3.13 - ChrisLovering
GitHub Actions run 12446349945 failed.
GitHub Actions run 12446356929 failed.
GitHub Actions run 12446375238 succeeded.
GitHub Actions run 12446375650 succeeded.
GitHub Actions run 12446378449 succeeded.
GitHub Actions run 12446379174 succeeded.
GitHub Actions run 12446379827 succeeded.
GitHub Actions run 12446380382 succeeded.
GitHub Actions run 12446380562 succeeded.
GitHub Actions run 12446381635 succeeded.
[python-discord/snekbox] branch deleted: bump-base-builder-version
2457e19 Pin python-freeipa to 1.0.8 - ChrisLovering
GitHub Actions run 12446424898 succeeded.
GitHub Actions run 12446432627 succeeded.
GitHub Actions run 12446433254 succeeded.
GitHub Actions run 12446433543 succeeded.
GitHub Actions run 12446434752 succeeded.
GitHub Actions run 12446437397 succeeded.
GitHub Actions run 12446437624 succeeded.
GitHub Actions run 12446447463 failed.
GitHub Actions run 12446454487 succeeded.
GitHub Actions run 12446462217 succeeded.
Connected!
GitHub Actions run 12512143560 succeeded.
GitHub Actions run 12516299403 succeeded.
New version seems to add an unwanted line in some cases (two newlines between codeblock and 1st paragraph), more investigation needed.
It probably doesn't matter, but looking at the usage I don't think we really want the new described behaviour. We should probably set threshold_to_diff_deeper=0 everywhere.
e2e3a6e Bump taskipy from 1.14.0 to 1.14.1 (#3206) - dependabot[bot]
GitHub Actions run 12538087255 succeeded.
Connected!
GitHub Actions run 12538103941 succeeded.
Connected!
GitHub Actions run 12538106605 succeeded.
GitHub Actions run 12538117697 succeeded.
Connected!
GitHub Actions run 12538121823 succeeded.
GitHub Actions run 12538129847 succeeded.
GitHub Actions run 12546258458 succeeded.
GitHub Actions run 12546262934 succeeded.
GitHub Actions run 12546267920 succeeded.
Connected!
GitHub Actions run 12546593326 succeeded.
Connected!
GitHub Actions run 12546621528 succeeded.
GitHub Actions run 12546625423 succeeded.
Connected!
GitHub Actions run 12546649636 succeeded.
GitHub Actions run 12546635151 succeeded.
GitHub Actions run 12547997165 succeeded.
GitHub Actions run 12548369028 succeeded.
There was another issue I've also fixed with headers that should have been rendered in bold instead of adding = underneath.
We should consider using # headers now discord supports them but that's a separate issue.
GitHub Actions run 12558743402 succeeded.
GitHub Actions run 12559544638 succeeded.
GitHub Actions run 12559747941 succeeded.
GitHub Actions run 12559750300 succeeded.
GitHub Actions run 12569962315 succeeded.
Connected!
GitHub Actions run 12571241230 succeeded.
GitHub Actions run 12571235096 was cancelled.
Connected!
GitHub Actions run 12571256512 succeeded.
GitHub Actions run 12571248253 succeeded.
Connected!
GitHub Actions run 12571264453 succeeded.
GitHub Actions run 12580699592 succeeded.
GitHub Actions run 12582111504 succeeded.
GitHub Actions run 12582996274 succeeded.
Connected!
Connected!
GitHub Actions run 12587346350 succeeded.
Connected!
GitHub Actions run 12587435976 succeeded.
Connected!
Connected!
GitHub Actions run 12587536898 succeeded.
Connected!
Connected!
Connected!
GitHub Actions run 12593182777 succeeded.
GitHub Actions run 12597931235 succeeded.
What is the purpose of this change? A single # seems correct as it is a top level header.
7b98c7b Bump sentry-sdk from 2.19.0 to 2.19.2 (#3224) - dependabot[bot]
b5a927f Bump pytest-subtests from 0.13.1 to 0.14.1 (#3225) - dependabot[bot]
Connected!
GitHub Actions run 12599118530 succeeded.
Connected!
GitHub Actions run 12599128304 succeeded.
GitHub Actions run 12599154617 succeeded.
GitHub Actions run 12599154583 succeeded.
Connected!
GitHub Actions run 12599195369 succeeded.
Connected!
GitHub Actions run 12599230339 succeeded.
GitHub Actions run 12610973440 succeeded.
[python-discord/bot] New branch created: dependabot-only-bump-major-versions
74e5b0d Configure dependabot to onyl open PRs for major... - ChrisLovering
Security updates will always open PRs
GitHub Actions run 12611739743 succeeded.
[bot] Branch dependabot-only-bump-major-versions was force-pushed to `7296b08`
GitHub Actions run 12611751277 succeeded.
[python-discord/bot] New branch created: fix-thread-close
3df806e Re-fetch help threads before closing. - swfarnsworth
This ensures that the thread title is up-to-date. Previously, even if someone changed the title of the thread, the bot might prepend the lock emoji to an older version of the title.
GitHub Actions run 12613748601 succeeded.
closed_post = await get_or_fetch_channel(bot.instance, closed_post.id)
Looks like get_or_fetch_channel is already imported in this file, so we can drop the import pydis_core entirely
GitHub Actions run 12619916719 succeeded.
Connected!
GitHub Actions run 12619917376 succeeded.
GitHub Actions run 12627123477 succeeded.
GitHub Actions run 12632133769 succeeded.
bfff06e Ensure every path to close a help channel cance... - ChrisLovering
[python-discord/bot] New branch created: fix-help-forum-scheudler
GitHub Actions run 12635118058 succeeded.
GitHub Actions run 12650699928 succeeded.
Do you need someone to review/test this?
d4002eb Abbreviate codeblock instructions; remove abili... - swfarnsworth
[python-discord/bot] New branch created: codeblock-instructions
โฆructions with emoji.
The more concise instructions are intended to be easier to read and increase the rate of followthru. That the instructions cannot be dismissed is intended to make them harder to ignore.
I sh...
GitHub Actions run 12681149778 succeeded.
I like the additional ideas you left in the PR description. This is still a good incremental improvement on its own.
Do you think this line was ineffective? The intent was to avoid spamming the channel with several attempts to fix their message. I don't know a better way to communicate this.
The embed title already says "please", so saying it again feels redundant to me.
I moved this instruction to the title for the embed.
Oh I need to read more carefully, sorry!
No problem; thank you for having written the original code in such a way that the changes in this PR were straightforward to make.
GitHub Actions run 12691322483 succeeded.
GitHub Actions run 12693085297 failed.
[python-discord/king-arthur] Checks Failed on PR: #298 chore(deps): update dependency ruff to v0.9.0
GitHub Actions run 12696489338 failed.
GitHub Actions run 12703734202 succeeded.
GitHub Actions run 12709261194 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #298 chore(deps): update dependency ruff to v0.9.1
GitHub Actions run 12717454453 failed.
This is just documenting an edge case for the parser (it seems to think the docstring is the code block).
0f3239a Further abbreviate the "wrong language specifie... - swfarnsworth
GitHub Actions run 12719396996 succeeded.
Considering single newlines are rendered in embeds too (#3172), replacing the double newlines should help reduce the vertical height a bit. I also think the "this will result in the following" section is unnecessary when the user (incorrectly) attempts to use a codeblock since it's often triggered by users right after being told to use a codeblock at all.
On a related note, I think adding something along the lines of "you can copy-paste the example in this embed if you're having trouble wi...
Do you need someone to review/test this?
Yup, once it has two reviews we can merge it
GitHub Actions run 12741293744 succeeded.
GitHub Actions run 12747275025 succeeded.
GitHub Actions run 12767984264 succeeded.
GitHub Actions run 12771033759 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.19.2
GitHub Actions run 12773918959 succeeded.
GitHub Actions run 12777405783 succeeded.
GitHub Actions run 12778076682 succeeded.
Connected!
GitHub Actions run 12778289328 succeeded.
GitHub Actions run 12808962762 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #298 chore(deps): update dependency ruff to v0.9.2
GitHub Actions run 12810597878 failed.
Connected!
[python-discord/bot] New branch created: shenanigansd-patch-1
d545aab Update supported Python versions in Snekbox hel... - shenanigansd
GitHub Actions run 12820655368 succeeded.
GitHub Actions run 12823528069 succeeded.
GitHub Actions run 12828831305 succeeded.
Hi,
As per the advice of a few server members, I decided to put together a tag about the removal of audioop in versions after 3.12 (3.13 and onwards) that could be used as an informative, short-hand way to explain to people why they are getting a ModuleNotFoundError pertaining to this module.
---
embed:
title: audioop in 3.13+
---
In newer, post-3.12, versions of Python, the library `audioop` has been removed. In bots made using `discord.py`, you will get a `ModuleNotFoundErr...
5a50fdc Update supported Python versions in Snekbox hel... - shenanigansd
[python-discord/bot] branch deleted: shenanigansd-patch-1
Connected!
GitHub Actions run 12843880123 succeeded.
People often ask why their question was closed. It would be great to provide detailed specific information when it happens.
GitHub Actions run 12845989522 succeeded.
GitHub Actions run 12846001550 succeeded.
๐
There's two typos in the commit titles ("cahnnel", "ative"), other than that it looks good to me.
GitHub Actions run 12846256094 succeeded.
Moderators can close help channels too.
Do you think it's worth distinguishing between an OP closing the post and a moderator closing the post?
GitHub Actions run 12846302315 succeeded.
3beee54 Remove unneeded constant - ChrisLovering
ea41edc Significantly shorten help channel close message - ChrisLovering
9ae4922 Change closing embed title based on close reason - ChrisLovering
6ee0b8a Add closing reason for when OP closes uses nati... - ChrisLovering
3fbd94a Don't repeat start of close message in every if... - ChrisLovering
[python-discord/bot] branch deleted: Show-close-reasons
Connected!
GitHub Actions run 12846762621 succeeded.
[python-discord/sir-robin] New branch created: code-jam-role-removal
This just adds to &codejam end the int eval that I used to unassign the code jam participant and code jam team lead roles.
GitHub Actions run 12847166459 succeeded.
4517729 Ensure every path to close a help channel cance... - ChrisLovering
[python-discord/bot] branch deleted: fix-help-forum-scheudler
GitHub Actions run 12847717927 succeeded.
Connected!
GitHub Actions run 12847718435 succeeded.
Connected!
GitHub Actions run 12847829465 succeeded.
This is a work-in-progress intended to allow us to lift the embargo on text file attachments. Whether we use this functionality, or anything like it, is subject to further discussion. I'm submitting it as a draft PR to expose what I've done so far.
Allowing text file attachments is intended to remove friction in making a user's code available to question-answerers during help sessions. If a user uploads their py file, and it's deleted by the bot, the user might become confused and not foll...
GitHub Actions run 12855839123 succeeded.
Description
I propose creating a command for a Discord bot that fetches (a) trivia question(s) from the Open Trivia Database (OpenTDB) and sends them as an embed message in the chat. The embed will include the question, category, difficulty, and response type (e.g: multiple, boolean). Users can respond to the question and receive feedback on whether their answer was correct.
Reasoning
This feature would add an engaging and interactive way for users to test their knowledge directly in...
We already have a trivia cog that supports both categories.
If you'd like to enhance this cog by adding an integraiton with an API to fetch new questions, or add a difficultly metric, please feel free to open new issues for those specifically.
GitHub Actions run 12866733711 succeeded.
I was looking for upcoming events - saw this and decided to suggest a quick edit. Not sure if this should just be removed from the "upcoming events" section as well? Up to you
GitHub Actions run 12875845435 succeeded.
GitHub Actions run 12887077502 succeeded.
Hello , can you assign this to me ? and also how can i get this type of messages that responds with link like that
GitHub Actions run 12891601097 failed.
GitHub Actions run 12892204323 failed.
Hello! I haven't gone over everything yet but one of the tests are failing. I've left a few comments on how to fix them. Feel free to ask in the #dev-contrib channel (or here, if that's what you prefer) if you need any further clarification or help.
> message_content = call_args.kwargs["content"]
E KeyError: 'content'
tests/bot/exts/utils/snekbox/test_snekbox.py:423: KeyError
CI is failing because content appears to be passed to ctx.send as a positional argument, not keyword argument.
message_content = call_args.args[0]
Will button in this case be the "View Full Output" button or "Run in 13.3" button? (Run in 13.3 button appears first.)
The mock message and expected output are different.
":white_check_mark: Your 3.12 eval job has completed with return code 0.\n\n```ansi\nWay too long beard\n```",
Can you please revert the formatting/linting changes that seem to have been done by black or similar which was given incorrect line length.
These changes are irrelevant to your PR, and makes reviewing more difficult that it needs to be.
Hey @ChrisLovering , i cant commit because of that linting issue , that s why i changed it , how can i commit without fixing it ?
[python-discord/king-arthur] Checks Failed on PR: #298 chore(deps): update dependency ruff to v0.9.3
GitHub Actions run 12938927131 failed.
# Check if the view contains the correct button self.assertIsNotNone(view) buttons = [item for item in view.children if isinstance(item, ui.Button)] button = ( buttons[-1] if buttons else None ) # Get the last button if buttons exist
what do you think about this ? @vivekashok1221 to check for the last button , which is always the View Full Output button
GitHub Actions run 12943497491 succeeded.
GitHub Actions run 12943627921 succeeded.
GitHub Actions run 12949950994 succeeded.
Connected!
Connected!
Connected!
Connected!
Hey @ChrisLovering , i cant commit because of that linting issue , that s why i changed it , how can i commit without fixing it ?
Our pre-commit-config doesn't include a formatter that would make these changes.
I suspect that you have black/ruff setup on your editor to format on save, which is causing these changes. You will need to disable that for this repository.
GitHub Actions run 12978254270 succeeded.
GitHub Actions run 12999491782 succeeded.
Tentatively approved. The feature looks solid, but I have stylistic concerns.
- Classes, methods and coroutines should have docstrings
- The cognitive complexity (e.g. mccabe) of
on_messageis too high. It's too deeply nested, too long, and doesn't break the code into logical blocks with helpful block comments headlining them as a longer piece of code ought to. I'd like to see a refactor here to move helper functions out into the class, and perhaps break up the different pieces into a fe...
coroutines deserve โจd o c s t r i n g s โจ
wait, why are we defining this function inside the coroutine? Is that necessary? It strikes me as seems needlessly nested / convoluted, I'd just make this a helper function and give it a leading underscore, make it part of the cog class, and use ?self._wait_for_upload_permission below as the callback.
If we're lifting the ban on .py, then anything adjacent feels like it might as well also be added. Maybe .js, .css, .html so that anyone using Python to build a webapp of some sort won't run into a brick wall? What about stuff like .yaml, .toml?
this comment is a bit WET ๐
it's not a surprise that PasteTooLongError means the paste is too long ๐
I'll have to see if that's possible, since it's reading bot_reply and message from the outer scope, and I think the signature of wait_for_upload_permission is mandated by self.bot.wait_for("reaction_add".
I realized later that that code has no effect on which file types are allowed.
I think that comment is an artefact of when I found out that a long paste can also raise ValueError.
7d424b8 Add helper function for extracting attachment t... - swfarnsworth
9f4177e Move EmbedFileHandler cog to its own module - swfarnsworth
1f50e94 Exit early if none of the attachments are text. - swfarnsworth
9aba058 Add comments explaining each step. - swfarnsworth
15c3e5e Add logging; expand initial message from bot; f... - swfarnsworth
GitHub Actions run 13044076516 succeeded.
@lemonsaurus thanks for your feedback. I thought I was in the finishing-touches stage for this, but there's actually still more to be done. I'm pushing what I've worked on this evening for additional scrutiny/ridicule.
GitHub Actions run 13053373551 succeeded.
I've confirmed that this function has to have the same signature as on_reaction_add event listeners, so there's no good way to break it out as a helper function.
[python-discord/king-arthur] Checks Failed on PR: #298 chore(deps): update dependency ruff to v0.9.4
GitHub Actions run 13060000457 failed.
GitHub Actions run 13061555611 succeeded.
GitHub Actions run 13062928711 failed.
8311343 Merge pull request #3232 from python-discord/co... - swfarnsworth
5a50fdc Update supported Python versions in Snekbox hel... - shenanigansd
3beee54 Remove unneeded constant - ChrisLovering
ea41edc Significantly shorten help channel close message - ChrisLovering
9ae4922 Change closing embed title based on close reason - ChrisLovering
GitHub Actions run 13062983220 failed.
7f13117 work-in-progress: when upload a text file attac... - swfarnsworth
bb808ee Migrate to py3.12 generic syntax (removes TypeV... - swfarnsworth
3ea3a27 Migrate to py3.12 typing syntax. - swfarnsworth
ea62c74 Apply token filters to text attachment content. - swfarnsworth
7d424b8 Add helper function for extracting attachment t... - swfarnsworth
[python-discord/bot] branch deleted: pastebin-auto-upload
GitHub Actions run 13063061754 failed.
186d5e9 Revert "Apply filtering to text attachments; of... - swfarnsworth
[python-discord/bot] New branch created: revert-3241-pastebin-auto-upload
GitHub Actions run 13063246234 succeeded.
[python-discord/bot] branch deleted: revert-3241-pastebin-auto-upload
[python-discord/bot] New branch created: pastebin-auto-upload
Connected!
GitHub Actions run 13063370010 succeeded.
GitHub Actions run 13063503779 succeeded.
GitHub Actions run 13063503779 succeeded.
GitHub Actions run 13063503779 succeeded.
GitHub Actions run 13063503779 succeeded.
Can we split this into multiple lines? I don't like the inline await and the bunch of stuff chained after.
I don't like this inline predicate midway through the function, if we need to use variables from a higher scope then a method specifically to create the predicate at the top of the file is much cleaner.
Same thing about nesting awaits.
Not sure this class name makes sense.
This predicate suffers from the same problem as above.
I've written a new method that handles both instances of waiting for the user to do a certain reaction. I don't see any other opportunity for modularization that I think would actually improve comprehendability.
Where would I find an example of them being used correctly?
a89d3ae Remove tests for deleted behavior. - swfarnsworth
fe6365d Move functionality for awaiting emoji reactions... - swfarnsworth
53afebe Make parenthetical await expressions their own ... - swfarnsworth
a037cff Add newline before if statement. - swfarnsworth
e3dd43a Rename class and some constants. - swfarnsworth
GitHub Actions run 13066246266 succeeded.
GitHub Actions run 13066875231 succeeded.
The current workflow for adding a note to a user feels kind of clunky. Often times I'll find myself copying the user ID, going to a mod channel, pasting the user ID in and typing the note content. And it's even more cumbersome if I need to link a message, as I'll have to switch back to the channel, copy the message link, jump back to the mod channel, and finish the remainder of the note.
I think this could be made significantly more ergonomic with a context menu command for both a user and ...
GitHub Actions run 13070771769 succeeded.
GitHub Actions run 13072851013 succeeded.
hm, okay I see. yeah that's a good reason, then :)
Sorry for the delay. This looks good to me.
I'm a bit 50/50 on this, because as said above, these criticisms still stand.
I'm not sure we should merge this as is.
Applied in master. Thanks!
We must rid ourselves of this dependency.
Would be happy for a re-review here, in loving memory of our brother Chris.
GitHub Actions run 13087795019 succeeded.
GitHub Actions run 13087784205 succeeded.
GitHub Actions run 13091671110 succeeded.
GitHub Actions run 13091836085 succeeded.
GitHub Actions run 13092007883 succeeded.
GitHub Actions run 13092079321 succeeded.
This pull request focuses on code simplification and optimization by using assignment expressions and more concise conditional statements. The changes span multiple files and functions, improving readability and efficiency.
Code Simplification:
bot/__main__.py: Simplified the conditional assignment ofstatsd_urlusing a single line ternary operation.- [
bot/converters.py](diffhunk://#d...
[Copilot is generating a summary...]
This pull request includes several changes to improve code readability, simplify logic, and update the CI workflow. The most important changes include modifying the CI configuration, simplifying conditional expressions, and refactoring list comprehensions.
CI Configuration Updates:
.github/workflows/build-deploy.yml: Updated the CI workflow to trigger on push and pull request events, repla...
I kindly ask you do not submit any AI-generated PRs, issues, or just
about anything else on our repositories ever again. If you, the human,
think that there is some refactoring needed, then please open an issue
to discuss it with us.
I took a quick glance over the code and most of it are highly
opinionated changes that carry absolutely no value for any of our
contributors or core developers to even spend a second to look at, not
to mention that often they also hurt readability or remov...
Connected!
GitHub Actions run 13100994691 succeeded.
Hey @axololly, can submit a PR to this directory: bot/resources/tags ?
GitHub Actions run 13102294919 succeeded.
GitHub Actions run 13107297742 succeeded.
GitHub Actions run 13116019059 succeeded.
GitHub Actions run 13120370150 succeeded.
GitHub Actions run 13135178722 succeeded.
GitHub Actions run 13142617449 succeeded.
GitHub Actions run 13145838090 succeeded.
GitHub Actions run 13165452452 succeeded.
GitHub Actions run 13165429566 succeeded.
GitHub Actions run 13172709288 succeeded.
GitHub Actions run 13186382435 succeeded.
Applied in master. Good bot.
I changed my mind.
- My brother from another mother integrated this library into larger parts of
the code than I had in mind. I do not want to stain his soil. - We are, by now, doing more than a few simple HTTP requests. Things like HTTP
header reuse and storing setting are GREAT and Python Discord needs MORE OF
THOSE!
GitHub Actions run 13186625926 succeeded.
GitHub Actions run 13186605671 succeeded.
[python-discord/site] New comment on pull request #773: Add guide for working with Python on Windows
@wookie184 good morning and happy new year! I hope you've had a great start to the year so far.
I'm wondering if there's something I can do to help move this PR forward?
GitHub Actions run 13186700666 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #298 chore(deps): update dependency ruff to v0.9.4
GitHub Actions run 13188421283 failed.
GitHub Actions run 13194070839 succeeded.
Connected!
GitHub Actions run 13200320179 succeeded.
GitHub Actions run 13204218430 succeeded.
e6f86c6 Send purged msg log to #message-change-log too - vivekashok1221
[python-discord/bot] New branch created: vivek/purge-msg-log
Resolves #3055.
I am sending the same message deletion logs currently sent to #mod-log to #message-change-log as well.
GitHub Actions run 13205358610 succeeded.
Could merge the points of both hosts and change the title to be something like "Why shared IP hosts are bad".
GitHub Actions run 13214623270 succeeded.
GitHub Actions run 13214626152 succeeded.
@swfarnsworth
I think Joe is saying that this line does not line up with the previous line, it seems one or two spaces too deeply indented (though I am viewing this on mobile so maybe it just looks wrong?
shouldn't this be 30 lines or 2000 characters, not and?
I agree, "file handlers" are a specific thing, this feels more like a MessageAttachmentUploader or something.
I agree with Joe, as I commented previously on to another version of this PR.
I think you can refactor out the two wait for reaction blocks into helper methods, and that lets you move those two inline functions to the very top of their respective method and murder a buncha birds with the same stone.
basically take the code that starts with the inline function declaration and ends with where you use that function, and that's a pretty reasonable scope for a helper method.
GitHub Actions run 13217988850 succeeded.
@lemonsaurus I think this is the helper method you requested
Connected!
Suspect Issues
This pull request was deployed and Sentry observed the following issues:
- โผ๏ธ HTTPException: 400 Bad Request (error code: 50083): Thread is archived
bot.exts.help_channelsView Issue
<sub>Did you find this useful? React with a ๐ or ๐</sub>
GitHub Actions run 13217665896 succeeded.
GitHub Actions run 13218898383 succeeded.
Connected!
GitHub Actions run 13228263337 succeeded.
GitHub Actions run 13228263214 succeeded.
GitHub Actions run 13228249869 failed.
GitHub Actions run 13228249869 succeeded.
GitHub Actions run 13234370614 succeeded.
GitHub Actions run 13256398961 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #298 chore(deps): update dependency ruff to v0.9.6
GitHub Actions run 13262162839 failed.
GitHub Actions run 13263277281 succeeded.
GitHub Actions run 13268588275 succeeded.
GitHub Actions run 13271136595 succeeded.
GitHub Actions run 13271188189 succeeded.
GitHub Actions run 13271391631 succeeded.
GitHub Actions run 13278971700 succeeded.
GitHub Actions run 13285049129 succeeded.
GitHub Actions run 13285097566 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.21.0
GitHub Actions run 13285415197 succeeded.
Everything I commented on seems to have been addressed. LGTM! ๐๐ญ
a20f1c0 Undo a revert - swfarnsworth
0e1810f Mark tests that aren't passing with xfail. - swfarnsworth
a89d3ae Remove tests for deleted behavior. - swfarnsworth
fe6365d Move functionality for awaiting emoji reactions... - swfarnsworth
53afebe Make parenthetical await expressions their own ... - swfarnsworth
[python-discord/bot] branch deleted: swfarnsworth/fix-auto-upload
If the help thread gets locked, will the bot be able to delete its message?
Users (including moderators) cant delete messages from a thread that is locked.
Before merge, please can you update the title and description to show the changes? Otherwise LGTM!
Connected!
I'm writing the changelog message--I'll do that right after.
GitHub Actions run 13293533675 succeeded.
Suspect Issues
This pull request was deployed and Sentry observed the following issues:
- โผ๏ธ HTTPException: 400 Bad Request (error code: 50083): Thread is archived
bot.exts.utils.attachment_pastebin_uploader in ...View Issue
<sub>Did you find this useful? React with a ๐ or ๐</sub>
Looks good, nothing much changes and is already tested so I think it's ready to go
Change !remindme so that it doesn't fail if it hasn't been provided either text or a reply to copy from. I'm pretty sure I'm not the only person who gets annoyed when the bot wants a placeholder, when really I just want a reference to the current conversation.
There are no tests for this part, but I don't have time to write them at the moment, hopefully that's okay.
GitHub Actions run 13312851796 succeeded.
[python-discord/bot] Pull request review submitted: #3259 Permit !remindme with no specified content
Looks good, left a minor comment,
The return type of this static method can be changed from str | None to str.
a20f1c0 Undo a revert - swfarnsworth
0e1810f Mark tests that aren't passing with xfail. - swfarnsworth
a89d3ae Remove tests for deleted behavior. - swfarnsworth
fe6365d Move functionality for awaiting emoji reactions... - swfarnsworth
53afebe Make parenthetical await expressions their own ... - swfarnsworth
GitHub Actions run 13315997318 succeeded.
Oop, whoops, knew I was missing something
GitHub Actions run 13320795495 succeeded.
I was trying to setup the bot, and I kept getting the PrivilegedIntentsRequired error.
Turns out when setting Privileged Gateway Intents, you also need to enable Message Content Intent, which is a relatively new intent introduced by Discord.
This PR updates the documentation to include that.
GitHub Actions run 13328423475 succeeded.
Looks good to me.
I do have a comment though: The Sir Lancebot setup guideline does not mention Privileged Intents (link).
We should do one of the following:
- add a section about Privileged Intents in the Sir-Lancebot setup guide
- create a new page about Privileged Intents and link it in both the Bot setup guide a...
Minimal reproducible example:
def has_lines(string: str, count: int) -> bool:
"""Return True if `string` has at least `count` lines."""
# Benchmarks show this is significantly faster than using str.count("\n") or a for loop & break.
split = string.split("\n", count - 1)
# Make sure the last part isn't empty, which would happen if there was a final newline.
return split[-1] and len(split) == count
print(has_lines("test\n", 1)) # returns True correctly
pri...
GitHub Actions run 13330852631 succeeded.
GitHub Actions run 13331706230 succeeded.
I'm curious how you found this
To be honest, I was just writing a bunch of new tests in hope to improve the coverage, but then came across a weird AssertionError that I totally did not expect ๐
GitHub Actions run 13333231457 succeeded.
GitHub Actions run 13334697699 succeeded.
GitHub Actions run 13334672808 succeeded.
GitHub Actions run 13336303551 succeeded.
GitHub Actions run 13346769741 succeeded.
GitHub Actions run 13346792146 failed.
GitHub Actions run 13346823747 succeeded.
802519e Send purged msg log to #message-change-log too ... - vivekashok1221
[python-discord/bot] branch deleted: vivek/purge-msg-log
GitHub Actions run 13355565988 was cancelled.
GitHub Actions run 13355573934 was cancelled.
GitHub Actions run 13355578707 was cancelled.
Connected!
GitHub Actions run 13355582063 succeeded.
GitHub Actions run 13355656206 failed.
GitHub Actions run 13355659572 was cancelled.
GitHub Actions run 13355660627 failed.
GitHub Actions run 13355677793 failed.
GitHub Actions run 13355731566 was cancelled.
GitHub Actions run 13355737871 succeeded.
LGTM, did not review the dependency changes. Surely you did not introduce malware.
[python-discord/king-arthur] branch deleted: 3.13
GitHub Actions run 13356731137 succeeded.
GitHub Actions run 13356952493 succeeded.
Added report template file, with the name and URL of the project.
Added the assignment description file.
GitHub Actions run 13357173218 failed.
The following events' date should be updated:
| Event | New Date |
|---|---|
| Holi | 13 - 14/03 |
| Easter | 20/04 |
| Eid-ul-Fitar | 11/04 |
| Diwali | 20 - 21/10 |
Note: The given dates are exact dates
since we don't use exact date instead we extend the durations of events, so that should be done by team members and domain leads.
All the dates are picked up from Google Calendar.
GitHub Actions run 13358009407 failed.
GitHub Actions run 13358023920 succeeded.
Raise a PR for this, from what I could find, Eid-ul-Fitar lands March 30/31, rather than April 11.
I also had to put Holi in for a day early to avoid conflict with pi-day. March & April will be a fun 2 months for our branding!
GitHub Actions run 13363561319 failed.
GitHub Actions run 13371259143 succeeded.
GitHub Actions run 13371264866 succeeded.
GitHub Actions run 13371277908 succeeded.
GitHub Actions run 13371284719 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.22.0
GitHub Actions run 13374606129 succeeded.
GitHub Actions run 13374990479 succeeded.
GitHub Actions run 13383619201 failed.
GitHub Actions run 13397858297 succeeded.
GitHub Actions run 13397941445 succeeded.
GitHub Actions run 13398501798 succeeded.
99bc4e4 Bump dev deps - ChrisLovering
500a303 Bump discord.py up to 2.5 - ChrisLovering
[python-discord/bot-core] New branch created: deps
99bc4e4 Bump dev deps - ChrisLovering
500a303 Bump discord.py up to 2.5 - ChrisLovering
1683547 Disable A005 errors - ChrisLovering
[python-discord/bot-core] branch deleted: deps
[python-discord/bot-core] New tag created: v11.6.0
bea01f5 Deploying to docs from @ python-discord/bot-cor... - ChrisLovering
GitHub Actions run 13398819725 succeeded.
GitHub Actions run 13398831448 failed.
GitHub Actions run 13398861543 succeeded.
GitHub Actions run 13402251764 succeeded.
GitHub Actions run 13413327301 succeeded.
GitHub Actions run 13413334972 succeeded.
GitHub Actions run 13417891007 succeeded.
d78499a fix: check category before moving to appeal cat... - vivekashok1221
[python-discord/modmail-plugins] New branch created: vivek/rejoin-appeal-category
e5b568c [DROP COMMIT BEFORE MERGE] Change appeal server... - vivekashok1221
[python-discord/modmail-plugins] New branch created: rejoin-appeal-category
[python-discord/modmail-plugins] branch deleted: vivek/rejoin-appeal-category
7fdeff8 Use category id instead of object - vivekashok1221
[python-discord/modmail-plugins] New branch created: vivek/rejoin-appeal-category
[modmail-plugins] Branch rejoin-appeal-category was force-pushed to `96b3017`
With PR #31, modmail threads will be automatically moved to the ban appeal category if a user with an open thread gets banned and then joins the ban appeal server. The bot will also send an embed stating ""Moving thread to ๐ฉ๏ฝModmail Appeals category since recipient has joined the appeals server.""
However, currently, if a user who is actively appealing leaves and rejoins the ban appeal server, the bot will send an embed stating "Moving thread to ๐ฉ๏ฝModmail Appeals category since recipient ...
[python-discord/modmail-plugins] branch deleted: vivek/rejoin-appeal-category
I see some sources claim it might begin on the 29th. There's no conflict so it's probably alright to give it another day
GitHub Actions run 13428364519 succeeded.
Related to #3248
Add context menu commands for adding notes to users and messages.
- Add
NoteModalclass to handle note input via a modal. - Add
add_note_to_usercontext menu command to add a note to a user. - Add
add_note_to_messagecontext menu command to add a note to a message. - Automatically include the user ID and message link in the modal.
- Ensure the
!notecommand is still available for more complex notes.
what I could find, Eid-ul-Fitar lands March 30/31, rather than April 11.
yeah actually I copied my last year's format #204 and forgot to edit date for eid
GitHub Actions run 13432986912 succeeded.
[modmail-plugins] Branch rejoin-appeal-category was force-pushed to `addfc10`
GitHub Actions run 13440233324 succeeded.
GitHub Actions run 13442038296 succeeded.
dc27fee Update CI - ChrisLovering
[modmail-plugins] Branch rejoin-appeal-category was force-pushed to `30996bd`
[modmail-plugins] Branch rejoin-appeal-category was force-pushed to `c448800`
[python-discord/modmail-plugins] branch deleted: rejoin-appeal-category
GitHub Actions run 13443842480 succeeded.
GitHub Actions run 13444798744 failed.
import telebot
import re
import os
import time
import logging
from telebot import types
from threading import Thread
from dotenv import load_dotenv
ุชุญู ูู ู ุชุบูุฑุงุช ุงูุจูุฆุฉ
load_dotenv()
TOKEN = os.getenv("2085227338:AAE1YjNOMH-ty3zOk7vkNtgq-_X1BQ5Zqto")
ADMIN_IDS = os.getenv("655911644")
ADMIN_IDS = list(map(int, ADMIN_IDS.split(',')))
MAX_FILE_SIZE_MB = 5
SUPPORTED_DOMAINS = {
"gmail": "gmail",
"outlook": "outlook|hotmail|live|msn",
"yahoo": "yahoo",
"icloud": "icloud",
...
GitHub Actions run 13450872927 succeeded.
GitHub Actions run 13454275317 succeeded.
GitHub Actions run 13454996825 succeeded.
Increase total coverage of actions_for() to 92% from 84%.
GitHub Actions run 13456171777 succeeded.
GitHub Actions run 13456711044 succeeded.
GitHub Actions run 13456721555 succeeded.
GitHub Actions run 13459185615 succeeded.
I suggest automatically deleting the timeout message if the user is banned within some window of time (maybe 10 minutes?) from when it was sent. Currently #internals-and-peps in particular tends to get filled up with messages about self botted accounts being muted after spamming across multiple channels. Mods then wind up banning the accounts, but the mute messages stick around, taking up space in the channel. Once the user has been banned, there's no longer anyone who should need to read the...
GitHub Actions run 13462762362 succeeded.
I don't have an environment to test this but the updates look functional for the dependency upgrades
The added note about pip-licenses not being PEP-639 compliant helped me follow that addition.
Looks good from all I can tell.
Changes in pyproject.toml look godo to me.
[python-discord/bot] branch deleted: deps
Connected!
GitHub Actions run 13464364600 succeeded.
Description
Allow the .color command to correctly recognize and match lower case input to the list of colors it uses as a reference.
Reasoning
It is weird for red to match Buttered Rum instead of Red.
Proposed Implementation
Convert the user input to a title casing when looking up the reference color.
Would you like to implement this yourself?
- [X] I'd like to implement this feature myself
- [ ] Anyone can implement this feature
[python-discord/sir-lancebot] New branch created: color_casing
a2b323d Adjust user input to title cased when looking u... - brad90four
Closes #1650
Description
Made the user input title cased when looking up the name in the reference color list.
Did you:
- [X] Join the Python Discord Community?
- [X] Read all the comments in this template?
- [X] Ensure there is an issue open, or link relevant discord discussions?
- [X] Read and agree to the contributing guidelines?
GitHub Actions run 13468378482 succeeded.
45bf97f Adjust user input to title cased when looking u... - brad90four
[python-discord/sir-lancebot] branch deleted: color_casing
Connected!
GitHub Actions run 13471417493 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Thank you for this contribution. I got this error when trying to run your code: https://paste.pythondiscord.com/K35Q
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
[python-discord/king-arthur] New branch created: rename-king-arthur-to-king-arthur-the-terrible
aa45637 Rename King Arthur to King Arthur The Terrible - jchristgit
GitHub Actions run 13481036951 succeeded.
GitHub Actions run 13481056782 succeeded.
GitHub Actions run 13481057986 succeeded.
GitHub Actions run 13481058187 succeeded.
GitHub Actions run 13481052982 succeeded.
GitHub Actions run 13481059081 succeeded.
GitHub Actions run 13481060285 succeeded.
GitHub Actions run 13481627178 succeeded.
GitHub Actions run 13481628245 succeeded.
GitHub Actions run 13481615425 succeeded.
GitHub Actions run 13481723527 succeeded.
GitHub Actions run 13481749017 succeeded.
GitHub Actions run 13481738786 succeeded.
GitHub Actions run 13481783051 succeeded.
GitHub Actions run 13481773841 succeeded.
GitHub Actions run 13481815962 succeeded.
GitHub Actions run 13481804509 succeeded.
GitHub Actions run 13483608000 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
GitHub Actions run 13491206019 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
GitHub Actions run 13506214547 succeeded.
GitHub Actions run 13506220063 succeeded.
GitHub Actions run 13506220311 succeeded.
GitHub Actions run 13506234262 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Hi folks. We're a group of students from KTH, and we'd like to take on this issue.
We'll be introducing an .adventure command that allows the user to play a text-based RPG.
The plot will be JSON-based, with a graph-like structure, which allows the player to transit from one scene to another based on the decision they make at that point.
cc @Xithrius @SebastiaanZ
Sure! I've assigned y'all.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
The guide didn't mention how many embeds are allowed per message nor that the total characters is shared across all embeds of the message.
Also removed the disputils library from pagination options as it's not supported for discord.py 2.x -> https://github.com/LiBa001/disputils/blob/master/setup.py#L21
GitHub Actions run 13528263730 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Some exciting sneak peeks ๐:
<img width="674" alt="Image" src="https://github.com/user-attachments/assets/c4d39f5d-a3a6-48f3-8b50-c18557a47c22" />
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Connected!
GitHub Actions run 13553318531 succeeded.
GitHub Actions run 13553289309 succeeded.
GitHub Actions run 13564640871 succeeded.
GitHub Actions run 13564965355 succeeded.
Hello! We're a group of students from KTH DD2480, and we'd like to take on this issue. As far I can tell there are no one assigned yet, would it be possible for me to get assigned?
Hello! We're a group of students from KTH DD2480, and we'd like to take on this issue. As far as I can tell there are no one assigned yet, would it be possible for me to get assigned?
GitHub Actions run 13566945918 succeeded.
GitHub Actions run 13571133169 succeeded.
GitHub Actions run 13581843510 succeeded.
GitHub Actions run 13588006468 succeeded.
GitHub Actions run 13592082615 succeeded.
Relevant Issues
This adds a text-based RPG adventure game. Closes #238.
Description
In this PR, we added an adventure.py file, and several JSON files as game assets.
The architecture is basically as follows:
- the
setupfunction loads theAdventurecog; - the
Adventurecog contains all the commands that can be invoked; - when
.adventure [game_code_or_index]is run, we instantiate aGameSessionwhich contains all the states, business logic, event handlers, ...
GitHub Actions run 13599056961 succeeded.
E.g. the command
!d `collections.Counter` some more text
does not work. It does work without the trailing text. Probably this is a nice simple first issue if someone wants to pick it up.
So probable culprit:
The code that tried to handle backticks is here:
https://github.com/python-discord/bot/blob/main/bot/exts/info/doc/_cog.py#L337
But the splitting of the string happens way later in:
https://github.com/python-discord/bot/blob/main/bot/exts/info/doc/_cog.py#L236
It's likely these should happen together, either moving the split much earlier, or the backtick handling much later.
GitHub Actions run 13613323536 succeeded.
GitHub Actions run 13614854259 succeeded.
GitHub Actions run 13614855097 succeeded.
GitHub Actions run 13614859546 succeeded.
GitHub Actions run 13614866447 succeeded.
GitHub Actions run 13614903569 succeeded.
GitHub Actions run 13614908507 succeeded.
GitHub Actions run 13614908493 succeeded.