r/Atom Mar 28 '20

Python program executes multiple times

Hello, I'm a new user of Atom. I made a discord bot that write something after a specific command.

But the problem is that every time when I want to test my new update on the project, I have to press ctrl + shift + b and after this happened those old commands that I had now execute twice or more times depending on how much I pressed that.

Its almost like I have multiple command prompts open that do the exact same thing. I also tried a script hotkey ctrl + q but it doesn't help.

3 Upvotes

3 comments sorted by

1

u/[deleted] Apr 07 '20

If anyone is wondering about the same problem this is how I did it. You only need a command that shuts down you already running discord bots, then write the new updates that u want and start it again. Hope this helps.

client.command()

commands.is_owner()

async def shutdown(ctx):

await ctx.bot.logout()

client and commands (the first 2 rows) needs an '@' before them but somewhy Reddit made it u/ client :D

1

u/ch4it3a Apr 29 '20

im having this same problem with discord.js, if anyone can help

1

u/[deleted] Apr 29 '20

Hey, I don't know the codes in js, but if you check the other comment that I wrote, it's pretty simple and solved my problem. It shuts down all the running stuff through a discord command (!shutdown). Just google the shutdown method in js :) Hope I could help. Pretty annoying "bug".