Discord.py bot tutorial (EXPLAINED IN COMMENTS)

Subscribers:
35
Published on ● Video Link: https://www.youtube.com/watch?v=FpIuBRS1Ask



Category:
Tutorial
Duration: 14:46
67 views
1


A basic bot tutorial in discord.py with ban, kick, status, latency and others
EXPLAINED:
import datetime
import disnake
import discord
from discord.ext import commands
^^^
These are all the libraries that we import if you do not have them install them with pip (pip3)

bot = commands.Bot(command_prefix="!",intents=intents, activity=discord.Activity(type=discord.ActivityType.listening, name="Port 8080"), status=discord.Status.idle)
intents = discord.Intents.all()
^^^
Here we define the bot and it's intents (what it intends to do)
this is important as without defining the bot it won't work

@bot.command()
async def status(send):
await send.send("Bot is running")
await send.send('Latency is: {0}'.format(round(bot.latency, 1)))
^^^
@bot.command() starts the command
async def status(send): defines what the command is gonna be called and some other variables and stuff

await send.send("Bot is running")
await send.send('Latency is: {0}'.format(round(bot.latency, 1))) -- these functions send out a message in the channel the command is ran in




Other Videos By YourLocalDeveloper


2023-11-13Ark Survival Evolved Ragnarok Map 1
2023-08-21Minecraft with shaders (survival)
2023-08-21Code1
2023-08-17Incident 13 Medkit, bandage, pistol and body armor models
2023-08-17Incident 13 Demo
2023-07-06Titanfall 2 campaign part 1
2023-07-05Titanfall 2 campaign part 1
2023-07-05Titanfall 2 Last Titan Standing
2023-05-12Test
2023-05-12Test
2023-05-12Discord.py bot tutorial (EXPLAINED IN COMMENTS)
2023-01-21Team Fortress 2 - Man vs Machine Pyro Madness
2022-08-04Warzone
2022-08-04Warzone
2022-08-04Cod Warzone Stream