Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- token_list = ['abc123',]
- mesid_list = ['123', '132']
- reactid_list = ['13', '12']
- mesid_reactid_map = {'123' : '12', '132' : '13'}
- def message_react():
- token = str(input('Token: '))
- message_id = input('message id: ')
- react_id = input('react id: ')
- #message_id is not a valid message within a channel that the authorised user has joined
- if message_id not in mesid_list:
- raise ValueError("Invalid message ID")
- #react_id is not a valid React ID
- if react_id not in reactid_list:
- raise ValurError("Invalid react ID")
- #Message with ID message_id already contains an active React with ID react_id
- if react_id == mesid_reactid_map[message_id]:
- raise ValueError("Message already contains an active react")
- return None
- message_react()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement