-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4893afd
commit 1dd11dd
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import discord | ||
from discord.ext import commands | ||
import pyautogui | ||
import random | ||
import time | ||
|
||
TOKEN = "" | ||
|
||
intents = discord.Intents.default() | ||
intents.message_content = True | ||
bot = commands.Bot(command_prefix="!", intents=intents) | ||
|
||
@bot.event | ||
async def on_ready(): | ||
print(f'Logged in as {bot.user.name} ({bot.user.id})') | ||
|
||
@bot.command() | ||
@commands.cooldown(rate=10, per=120, type=commands.BucketType.user) | ||
async def shock(ctx): | ||
# Click the screen at the specified coordinates | ||
pyautogui.click(700, 500) | ||
|
||
# Send the message | ||
await ctx.send(f"Shocked the pet!") | ||
|
||
@shock.error | ||
async def shock_error(ctx, error): | ||
if isinstance(error, commands.CommandOnCooldown): | ||
# Inform user of the cooldown | ||
await ctx.send("Wow! The pet is fried! The collar needs to discharge static electricity, cooldown mode lasts 2 minutes.") | ||
|
||
bot.run(TOKEN) | ||
|