Python Forum
Discord Bot doesnt work when opened with windows
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Discord Bot doesnt work when opened with windows
#1
I made a few changes to my discord bot and added a new command, a joke about hacking a discord server. The problem i have found is that it only runs when you run it with python (f5) but when you double click it, it doesnt.

Here is the code:

## Hack Command
@bot.command(pass_context=True)
async def hack_server_now(ctx):
await bot.say(">>> Initiating hack of the server")
await asyncio.sleep(2)
await bot.say(">>> Progress: 18%")
await asyncio.sleep(2)
await bot.say(">>> Progress: 31%")
await asyncio.sleep(2)
await bot.say(">>> Progress: 52%")
await asyncio.sleep(2)
await bot.say(">>> Progress: 75%")
await asyncio.sleep(2)
await bot.say(">>> Progress: 82%")
await asyncio.sleep(2)
await bot.say(">>> Progress: 99%")
await asyncio.sleep(2)
await bot.say(">>> Hacking Complete! \n This server now belongs to Jarvis. \n ███████▓█████▓▓╬╬╬╬╬╬╬╬▓███▓╬╬╬╬╬╬╬▓╬╬▓█ \n████▓▓▓▓╬╬▓█████╬╬╬╬╬╬███▓╬╬╬╬╬╬╬╬╬╬╬╬╬█ \n███▓▓▓▓╬╬╬╬╬╬▓██╬╬╬╬╬╬▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ \n████▓▓▓╬╬╬╬╬╬╬▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ \n███▓█▓███████▓▓███▓╬╬╬╬╬╬▓███████▓╬╬╬╬▓█ \n████████████████▓█▓╬╬╬╬╬▓▓▓▓▓▓▓▓╬╬╬╬╬╬╬█ \n███▓▓▓▓▓▓▓╬╬▓▓▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ \n████▓▓▓╬╬╬╬▓▓▓▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ \n███▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ \n█████▓▓▓▓▓▓▓▓█▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ \n█████▓▓▓▓▓▓▓██▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ \n█████▓▓▓▓▓████▓▓▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ \n████▓█▓▓▓▓██▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ \n████▓▓███▓▓▓▓▓▓▓██▓╬╬╬╬╬╬╬╬╬╬╬╬█▓╬▓╬╬▓██ \n█████▓███▓▓▓▓▓▓▓▓████▓▓╬╬╬╬╬╬╬█▓╬╬╬╬╬▓██ \n█████▓▓█▓███▓▓▓████╬▓█▓▓╬╬╬▓▓█▓╬╬╬╬╬╬███ \n██████▓██▓███████▓╬╬╬▓▓╬▓▓██▓╬╬╬╬╬╬╬▓███ \n███████▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬████ \n███████▓▓██▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓████ \n████████▓▓▓█████▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█████ \n█████████▓▓▓█▓▓▓▓▓███▓╬╬╬╬╬╬╬╬╬╬╬▓██████ \n██████████▓▓▓█▓▓▓╬▓██╬╬╬╬╬╬╬╬╬╬╬▓███████ \n███████████▓▓█▓▓▓▓███▓╬╬╬╬╬╬╬╬╬▓████████ \n██████████████▓▓▓███▓▓╬╬╬╬╬╬╬╬██████████ \n███████████████▓▓▓██▓▓╬╬╬╬╬╬▓███████████")



By the way, yes it is indented and all of the squares make an Anonymous mask
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Why doesnt chunk generation work? LotosProgramer 0 247 Jun-18-2021, 01:13 PM
Last Post: LotosProgramer
  if conditions in the for indentation doesnt work ? Sutsro 6 1,313 Jun-15-2021, 11:45 PM
Last Post: bowlofred
  Rmarkdown opened by python code - errors Rav013 0 490 Apr-27-2021, 03:13 PM
Last Post: Rav013
Photo Windows 10 PowerShell doesn't work Amy 3 1,354 Apr-27-2021, 01:33 PM
Last Post: jefsummers
  I have two Same Code but One of them Doesnt Work beginner721 6 779 Jan-22-2021, 10:56 PM
Last Post: beginner721
  Can not get tkinter to work in Windows 10 via python 3.9 idris03 1 744 Nov-03-2020, 03:22 AM
Last Post: deanhystad
  code doesnt return anything ofrihemo 3 806 Jun-30-2020, 05:14 PM
Last Post: ofrihemo
  taking input doesnt print as list bntayfur 2 800 Jun-04-2020, 02:48 AM
Last Post: bntayfur
  Update setup.py to work on Windows #3 Toolman 2 1,025 May-19-2020, 02:21 PM
Last Post: Toolman
  Creating Discord Bot: Unused import statement 'import discord EyeballCandy 0 1,901 Feb-02-2020, 10:53 PM
Last Post: EyeballCandy

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020