engineer-man / piston-bot

I Run Code bot on Discord
https://emkc.org/run
MIT License
239 stars 35 forks source link

I cannot run code with file without providing the args section. #72

Closed killersmath closed 2 years ago

killersmath commented 2 years ago

Hi there.

We cannot use the command /run with file and stdin without provide de args section. That is because the regex for the command with file requires to set the args section.

https://github.com/engineer-man/piston-bot/blob/master/src/cogs/run.py#L44

Is it the initial idea or just passed the test ?

brtwrst commented 2 years ago

you should now be able to run files with no args and only stdin like this (example)

/run python

stdin1
stdin2

stdin3
stdin4