I'm trying to do autoclick on button in DM's using discum. My actual code:
import discum
bot = discum.Client(token='token')
from discum.utils.button import Buttoner
@bot.gateway.command
def message_data(resp):
if resp.event.message:
m = resp.parsed.auto()
channelID = m['channel_id']
messageID = m['id']
message = bot.getMessage(channelID, messageID)
data = message.json()[0]
buts = Buttoner(data["components"])
bot.click(
data["author"]["id"],
channelID=data["channel_id"],
messageID=data["id"],
messageFlags=data["flags"],
data=buts.getButton("First"),
)
bot.gateway.run()
It should work but... Nope. Maybe I'm stupid, if you can - please help me!