meta icon indicating copy to clipboard operation
meta copied to clipboard

Eval output in general?

Open ZeroIntensity opened this issue 3 years ago • 7 comments

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?

ZeroIntensity avatar Oct 11 '22 23:10 ZeroIntensity

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.

wookie184 avatar Oct 18 '22 12:10 wookie184

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?

ZeroIntensity avatar Oct 21 '22 02:10 ZeroIntensity

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?

wookie184 avatar Oct 21 '22 09:10 wookie184

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 ...").

jonathan-d-zhang avatar Oct 21 '22 11:10 jonathan-d-zhang

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

ZeroIntensity avatar Oct 21 '22 20:10 ZeroIntensity

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.

ChrisLovering avatar Oct 21 '22 20:10 ChrisLovering

oh i didn't realize that existed

ZeroIntensity avatar Oct 21 '22 20:10 ZeroIntensity