0

I made bot that sends tracks discord channel and send me the messages every 24 hours. the message are like this:

Daily Quest announcement | click here to report a problem

Today's Daily Quest is:

n of random item 1 For 40-50 coins

n random item 2 for 10-20 coins (n is between 1 to 200)

Today's Date:

May 25, 2023

Estimated Final Price:

50 coins

Price Prediction:

slowly Dropping

...

i dont really care about anything i just want to store the n of random item 1 and n of random item 2

The problem i encountered is that i can only acess string in line 1 if i do message.find("Today") i get -1 as a result

Ive tried getting rid of the \n by:

single_line = message.replace('\n', '')

or

message.strip("\n")  

but nothing seems to work

It works perfectly on regular multiline strings

working_string = """ multiline
string
that
works
"""

but when i try to do

x = str(input("paste message")

it doesnt work

thank you for reading

matszwecja
  • 6,357
  • 2
  • 10
  • 17
farahead
  • 11
  • 1

0 Answers0