Skip to content
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

Single backslash rstripped in input #54

Open
YumYummity opened this issue Apr 13, 2023 · 2 comments
Open

Single backslash rstripped in input #54

YumYummity opened this issue Apr 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@YumYummity
Copy link
Contributor

Describe the bug
A single backslash can be placed at the end of an integer.
EG. -slots 200000\ results in the same thing as -slots 200000

To Reproduce

# using guilded.ext.commands.Bot
@bot.command(name='slots')
async def testcode(ctx, amount:int):
    await ctx.reply(str(amount), private=ctx.message.private)

Afterwards, just run -slots 200000\

Expected behavior
Raise an error: Converting to "int" failed for parameter "amount".

Actual behavior
Command runs as if the backslash isn't there.

Screenshots
image

Environment

  • OS: Windows 10 Microsoft Windows [Version 10.0.19044.2728] (testing) and Ubuntu 22.04.1 LTS x86-64 VM (hosting)
  • Python version (make sure you're using >=3.8): 3.10.6
  • Library version: 1.7.0 (March 4 release on PyPi.org)
@YumYummity YumYummity added the bug Something isn't working label Apr 13, 2023
@shayypy
Copy link
Owner

shayypy commented Apr 16, 2023

Not sure what's causing this, it's stripped from string arguments too. Seems fairly inconsequential but I'll keep it open as a reminder to look into it.

@YumYummity
Copy link
Contributor Author

This only happens for a single backslash, and it gives the correct input if you have 2 or more backslashes.

@YumYummity YumYummity changed the title Backslash accepted in integer input conversion Single backslash rstripped in input Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants