#Can this bot works as an API endpoint?

1 messages · Page 1 of 1 (latest)

balmy ice
#

Hey, I'm currently working on a bot that integrate with google sheets. In this sheets, I have a button to notify about changes in sheets and basically mentions some roles in the discord server. How can this be done with interactions.py? My first instinct is just to call an http request from google sheets script to the discord bot, which I think some other library does it well with flask integration. Is such feature available?

my second choice is to just use background task to periodically track changes in sheets, but it definitely won't be efficient

unique wyvernBOT
#

Hey! Once your issue is solved, press the button below to close this thread!

nimble brook
#

i'm not sure if i'm following here

#

are you asking how to implement logic with i.py to handle a button for checking google sheet changes?

unique wyvernBOT
#

You are trying to ask a question about your attempt at solving a problem instead of the problem you are trying to solve. https://xyproblem.info

nimble brook
#

if you can explain to me what exactly it is you're wanting to do instead of trying, i might be able to help assist further, but i cannot parse what you're saying so far

balmy ice
#

hey, what i meant is basically triggering a command without using slash command, but from api call instead

urban yoke
#

you can run some script that listens on a specific address and make it run some callback in your interactionspy script

#

if its a small bot you can fetch the guild, fetch the channel and then send a message

#

But i think you might be better off using webhooks

nimble brook
#

Calling the command function directly works too