@bot.gateway.command
def opendm(resp):
for id in [ID, ID]:
dm = bot.createDM([id]).json()["id"]
bot.sendMessage(dm, "message")
asyncio.sleep(5)
bot.gateway.run()
==
it sends the message perfectly fine, the "message" is what i want to send, works fine, the "ID, ID" sends to both IDs perfectly fine, but it spams them if i let the code keep running, idk why and idk how to fix it, i tried adding break at the end, still doesnt work
@bot.gateway.command def opendm(resp): for id in [ID, ID]: dm = bot.createDM([id]).json()["id"] bot.sendMessage(dm, "message") asyncio.sleep(5)
bot.gateway.run()
== it sends the message perfectly fine, the "message" is what i want to send, works fine, the "ID, ID" sends to both IDs perfectly fine, but it spams them if i let the code keep running, idk why and idk how to fix it, i tried adding break at the end, still doesnt work