DISCORD BOT COMMANDS
HERE'S A STEP TO STEP TUTORIAL ON HOW TO MAKE DISCORD BOTS WITH 0% KNOWLEDGE OF PYTHON OR DISCORD.PY!
NOTE: Please Be Patient, I'm Updating All Of This
If You Need Any Help, Please Feel Free To DM Me: FakeTOG#6666 It Would Greatly Support Me If You Joined The Coolest Discord Server Ever: https://discord.gg/bHt2Skqujk
ALSO, I'm always wanting to add more stuff to the bot, so feel free to tell me if you want me to add something, I'll do it asap!
Notes
Ok, Let Me Explain... For This Bot, You don't at all need any python experience, you just have to grab the necessary codes from each file into your main file!
Here's How This Works:
For Example mainbotcode.py
has the following code:
intents = discord.Intents.default() #default intents
intents.all()
#main code starts here!
client = commands.Bot(command_prefix='$', intents=intents, case_insensitive=True, allowed_mentions=discord.AllowedMentions(everyone=False))#$ is your prefix
#whatever code you want to add, do it after this line
@client.event
async def on_ready():
"""This Event Gets Triggered When The Bot Successfully Connects To The Internet!"""
print("The Bot Is Now Ready To Run!")
#your code shouldn't cross this line!
client.run(token)
You just have to add your code in between! You can get the necessary code from the py files in each folder just by copy pasting the codes!
HOW TO START
I'm going to assume you have 0% python knowledge for this one! [1] First things first, go to https://python.org and install python!
[2] In the Python installer, make sure enable ADD PYTHON TO PATH
or ADD PYTHON TO ENVIRONMENT VARIABLES
!
[3] You now need a compiler or an editor! - I personally use Visual Studio Code (https://code.visualstudio.com) But feel free to use whatever you like!
--- Good options are Codeblocks, Visual Studio, Pycharm, Atom, Anaconda Navigator, Sublime Text etc!
[4] Now open cmd and type pip - it will show you pip info!
--- If it doesn't contact me and I'll be happy to help! - https://discord.gg/bHt2Skqujk
[5] Type in the following commands 1 by 1:
pip install discord
pip install discord.py[voice]
pip install requests
[6] Now that you have the necessary libraries, just install these source codes to your computer so you can start editing!
HOW TO USE
It's something like how you try clothes in a store, but just that it's free XD, unless you want to donate!
Just open mainbotcode.py
and keep it ready
Thennnn open the folders and add the necessary codes!
FOR EXAMPLE:
Taking Code From moderator commands/kick.py
:
@client.command()
@commands.has_permissions(kick_members=True)
async def kick(ctx, member: discord.Member, *, reason=None):
if member.guild_permissions.kick_members:
embed = discord.Embed(title="", description=f"{ctx.author.mention} He's A Protected User")
embed.set_author(name="Fake TOG")
embed.set_footer(text=f"Requested By: {ctx.author.name}#{ctx.author.discriminator}", icon_url=ctx.author.avatar_url)
await ctx.send(embed=embed)
else:
if member == ctx.author:
embed = discord.Embed(title="", description=f"{ctx.author.mention} It's Not Wise To Kick Your Self")
embed.set_author(name="Fake TOG")
embed.set_footer(text=f"Requested By: {ctx.author.name}#{ctx.author.discriminator}", icon_url=ctx.author.avatar_url)
await ctx.send(embed=embed)
else:
try:
await member.kick(reason=reason)
embed = discord.Embed(title="", description=f"`{member.name}#{member.discriminator}` Was Kicked From `{ctx.guild.name}` By {ctx.author.mention} With Reason: `{reason}` Successfully!")
embed.set_author(name="Fake TOG")
embed.set_footer(text=f"Requested By: {ctx.author.name}#{ctx.author.discriminator}", icon_url=ctx.author.avatar_url)
await ctx.send(embed=embed)
except:
embed = discord.Embed(title="", description=f"{ctx.author.mention} You Don't Have Permission To Do This!")
embed.set_author(name="Fake TOG")
embed.set_footer(text=f"Requested By: {ctx.author.name}#{ctx.author.discriminator}", icon_url=ctx.author.avatar_url)
await ctx.send(embed=embed)
Adding it mainbotcode.py
:
intents = discord.Intents.default() #default intents
intents.all()
#main code starts here!
client = commands.Bot(command_prefix='$', intents=intents, case_insensitive=True, allowed_mentions=discord.AllowedMentions(everyone=False))#$ is your prefix
#whatever code you want to add, do it after this line
@client.event
async def on_ready():
"""This Event Gets Triggered When The Bot Successfully Connects To The Internet!"""
print("The Bot Is Now Ready To Run!")
@client.command()
@commands.has_permissions(kick_members=True)
async def kick(ctx, member: discord.Member, *, reason=None):
if member.guild_permissions.kick_members:
embed = discord.Embed(title="", description=f"{ctx.author.mention} He's A Protected User")
embed.set_author(name="Fake TOG")
embed.set_footer(text=f"Requested By: {ctx.author.name}#{ctx.author.discriminator}", icon_url=ctx.author.avatar_url)
await ctx.send(embed=embed)
else:
if member == ctx.author:
embed = discord.Embed(title="", description=f"{ctx.author.mention} It's Not Wise To Kick Your Self")
embed.set_author(name="Fake TOG")
embed.set_footer(text=f"Requested By: {ctx.author.name}#{ctx.author.discriminator}", icon_url=ctx.author.avatar_url)
await ctx.send(embed=embed)
else:
try:
await member.kick(reason=reason)
embed = discord.Embed(title="", description=f"`{member.name}#{member.discriminator}` Was Kicked From `{ctx.guild.name}` By {ctx.author.mention} With Reason: `{reason}` Successfully!")
embed.set_author(name="Fake TOG")
embed.set_footer(text=f"Requested By: {ctx.author.name}#{ctx.author.discriminator}", icon_url=ctx.author.avatar_url)
await ctx.send(embed=embed)
except:
embed = discord.Embed(title="", description=f"{ctx.author.mention} You Don't Have Permission To Do This!")
embed.set_author(name="Fake TOG")
embed.set_footer(text=f"Requested By: {ctx.author.name}#{ctx.author.discriminator}", icon_url=ctx.author.avatar_url)
await ctx.send(embed=embed)
#your code shouldn't cross this line!
client.run(token)
NECESSARY IMPORTS YOU MAY WANNA ADD:
#discord imports #pip install discord & pip install discord.py[voice]
import discord
import discord.ext.commands
from discord.ext.commands import bot
from discord import Game
from discord.ext import commands
from discord.ext.commands import CommandNotFound
from discord.ext.commands import errors
import discord.utils
from discord.utils import find, get
import asyncio #pip install asyncio
import aiohttp #pip install aiohttp
#some imports you can add if you want
import platform #pip install platform
import os
import random
import string
import requests #pip install requests
import math
import binascii
import subprocess
import json
import sys
import urllib, urllib3 #pip install urllib
#feel free to add more
That's all! - NO PYTHON KNOWLEDGE REQUIRED XD! - THIS SHOULD LITERALLY TAKE YOU 15 Minutes!
**AGAIN, IF YOU NEED HELP: https://discord.gg/bHt2Skqujk