Ask your own question, for FREE!
Miscellaneous 15 Online
StalkerGirl69:

Can ANYONE help me make an application (Bot) on a discord server. I only got to a certain point, but now I'm stuck.

Bluehorizon19:

I can try... buuuuut idk how😭

ykbatman:

huh

Sailor:

Are you asking how to make a bot from scratch or..? /genq

AcornTheNut:

not much context here

ihy:

Ask aratox

StalkerGirl69:

@ihy wrote:
Ask aratox
I did but

AcornTheNut:

yeah aratox is a cs goat

StalkerGirl69:

All I got was a link, no context to it

AcornTheNut:

oh

StalkerGirl69:

@sailor wrote:
Are you asking how to make a bot from scratch or..? /genq
I made the bot, I just need to install it. And idk how to.

ihy:

Ask him to give you context then…

ihy:

Or just look it up on YT

StalkerGirl69:

@ihy wrote:
Ask him to give you context then…
You think I haven't already?

ihy:

@stalkergirl69 wrote:
@ihy wrote:
Ask him to give you context then…
You think I haven't already?
Go to YT then

TurtleUWU:

https://www.youtube.com/watch?v=Oy5HGvrxM4o I used this to make mine

Aratox:

@turtleuwu wrote:
that video's outdated by about 2 years and Discord bots no longer follow these exact procedures.

TurtleUWU:

I dunno I had it save to my files on my discord server

TurtleUWU:

I used it

TurtleUWU:

let me ask my friend he an expert at this

TurtleUWU:

https://discord.com/developers/applications go here alright so you make a new application, click it to create oh and name it go to the bot section and choose add bot from discord.ext import commands import discord import os bot = commands.Bot(command_prefix='!', intents=discord.Intents.all()) @bot.command() async def greet(ctx: commands.Context): await ctx.send('Hello there!') @bot.event async def on_ready(): print(f"{discord.utils.oauth_url(bot.user.id, permissions=discord.Permissions.all())}") bot.run(os.environ["DICORD_BOT_TOKEN"])

TurtleUWU:

import discord from discord.ext import commands class MyBot(commands.Bot): async def setup_hook(self): try: synced = await self.tree.sync() except discord.HTTPException as e: print(f"Failed to sync commands: {e}") else: print(f"Synced {len(synced)} commands") bot = MyBot(command_prefix="!", intents=discord.Intents.all()) @bot.command() async def greet(ctx: commands.Context, member: discord.Member): await ctx.send(f'Hello there {member.mention}') @bot.tree.command(name="ping") async def ping(ctx: discord.Interaction): await ctx.response.send_message("Pong!") @bot.hybrid_command() async def echo(ctx: commands.Context, message: str): await ctx.send(message) @bot.event async def on_ready(): print(f"{discord.utils.oauth_url(bot.user.id, permissions=discord.Permissions.all())}") bot.run("YOUR TOKEN HERE")

Aratox:

To create a Discord bot, you would have to go to their Developer page (discord.com/developers), create an application, and enable message intents. (There are more steps required, however I do not have access to my PC as of right now - I'll post the rest once I have my PC at hand.) After you create an application and invite it to your server, you'll need to CODE an actual bot... I do have a Replit bot template which you can use if necessary (THIS REQUIRES YOUR BOT'S TOKEN, DO NOT SHARE IT WITH ANYONE):

Code:
# This code is based on the following example: # https://discordpy.readthedocs.io/en/stable/quickstart.html#a-minimal-bot import os import discord intents = discord.Intents.default() intents.message_content = True client = discord.Client(intents=intents) @client.event async def on_ready(): print('We have logged in as {0.user}'.format(client)) @client.event async def on_message(message): if message.author == client.user: return if message.content.startswith('$hello'): await message.channel.send('Hello!') try: token = os.getenv("TOKEN") or "" if token == "": raise Exception("Please add your token to the Secrets pane.") client.run(token) except discord.HTTPException as e: if e.status == 429: print( "The Discord servers denied the connection for making too many requests" ) print( "Get help from https://stackoverflow.com/questions/66724687/in-discord-py-how-to-solve-the-error-for-toomanyrequests" ) else: raise e
(Source: replit.com/@replit/Python-Discord-Bot#main.py) This code gets the bot's token from an ENV file (in this case, the Secrets pane on Replit) and then runs the bot to render it online.

TurtleUWU:

@aratox wrote:
To create a Discord bot, you would have to go to their Developer page (discord.com/developers), create an application, and enable message intents. (There are more steps required, however I do not have access to my PC as of right now - I'll post the rest once I have my PC at hand.) After you create an application and invite it to your server, you'll need to CODE an actual bot... I do have a Replit bot template which you can use if necessary (THIS REQUIRES YOUR BOT'S TOKEN, DO NOT SHARE IT WITH ANYONE):
Code:
# This code is based on the following example: # https://discordpy.readthedocs.io/en/stable/quickstart.html#a-minimal-bot import os import discord intents = discord.Intents.default() intents.message_content = True client = discord.Client(intents=intents) @client.event async def on_ready(): print('We have logged in as {0.user}'.format(client)) @client.event async def on_message(message): if message.author == client.user: return if message.content.startswith('$hello'): await message.channel.send('Hello!') try: token = os.getenv("TOKEN") or "" if token == "": raise Exception("Please add your token to the Secrets pane.") client.run(token) except discord.HTTPException as e: if e.status == 429: print( "The Discord servers denied the connection for making too many requests" ) print( "Get help from https://stackoverflow.com/questions/66724687/in-discord-py-how-to-solve-the-error-for-toomanyrequests" ) else: raise e
(Source: replit.com/@replit/Python-Discord-Bot#main.py) This code gets the bot's token from an ENV file (in this case, the Secrets pane on Replit) and then runs the bot to render it online.
I just said that -_-

Aratox:

No, you did not explain in detail - there's a difference.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!