#๐Ÿ”’ Digit recognition

30 messages ยท Page 1 of 1 (latest)

worn thicketBOT
#

@astral spire

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

tame mason
#

how is the digit given?

astral spire
#

It is given through a message

tame mason
#

Then I guess just pass it in to the function while checking that its a digit

#

.isdigit() helps

astral spire
tame mason
astral spire
#

it is a bot running on my computer, just the code editor. I am using pyautogui, I am calling it a bot because it handles on my computer

#

let's just keep it simple

#

it is not a bot

#

it is a program

#

it makes a screenshot and then reads the latest message

little yoke
#

Maybe you should show the receiving code which runs when this happens: "the digit "263" is given"

tame mason
astral spire
little yoke
#

But you're planning on using screenshots? Not writing something which plugs directly into discord? I think we're both pretty unclear on your plans.

astral spire
tame mason
#

That's probably gonna involve pytesseract and OCR at every frame and then regex to find the pattern of "digits"

astral spire
#

It is just a script and it is trying to detect a number typed in a discord channel

tame mason
#

It won't be quick and is prone to problems

#

Not sure I can help on this one

astral spire
#

Then I will probably have to find another solution

#

It regards a counting bot, keeping track of the current number

#

my solution will probably be, a variable as the starting number when started and for every new message it appends 1 to the variable

#

Lets see if I can make it work

astral spire
#

I made it work a while ago

worn thicketBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.

#

๐Ÿ”’ Digit recognition