python-discord / meta

Issue tracker for suggestions and other questions relating to our community
https://pythondiscord.com
30 stars 5 forks source link

Eval output in general? #201

Open ZeroIntensity opened 1 year ago

ZeroIntensity commented 1 year ago

is there any chance eval output could be allowed in pygen? or at least stop the bot from deleting the message?

it’s really annoying trying to give examples or test something when the bot is deleting the message and/or you have to go to another channel to see the output

if spam is your worry it shouldn’t be all that hard to have a cooldown and line limit right?

wookie184 commented 1 year ago

Moved to meta as it's more a policy discussion.

A cooldown doesn't help much when there are a lot of people in a channel at once, similar to how a channel can still be very active when slowmode is quite high. It adds extra noise from trying to run code but being stopped by the cooldown. By not allowing it at all people know they can't use it there so there's no added noise.

If you want to test something it would be better to be in #bot-commands. If you want to share/show an example you can still show a REPL result, which is much more concise than the user message, bot message, and added info:

>>> x = [1, 2, 3]
>>> x[1:]
[2, 3]
>>> x[::2]
[1, 3]

If you want to explain something to someone in more detail/give more complex examples it may be better to open a help channel.

ZeroIntensity commented 1 year ago

ok, sorry for the late follow up but sharing a repl result isn't an option a fair amount of the time due to mobile limitations (such as no code blocks).

maybe a "repl output" command could be added then?

wookie184 commented 1 year ago

You should be able to send codeblocks on mobile the same way you can normally using backticks.

```python
# Code goes here
```

What would the repl output command do?

jonathan-d-zhang commented 1 year ago

I think a "quiet" version of the !eval command would be interesting, sort of like how there's 2 versions of the "off topic" command. The quiet version could output less lines, have smaller information text (cut out the "your eval job completed with ...").

ZeroIntensity commented 1 year ago

you can see codeblocks, but you can't post them (on ios at least), since theres no actual backtick key on the keyboard

ChrisLovering commented 1 year ago

you can see codeblocks, but you can't post them (on ios at least), since theres no actual backtick key on the keyboard

Switch to numbers, then press and hold the apostrophe.

ZeroIntensity commented 1 year ago

oh i didn't realize that existed