1#go to -- https://python.org
2#Download and install python
3#go to CMD and install -- pip install discord
4import discord
5from discord.ext import commands
6
7Token_1 = input("put your bot token here :")
8Prefix_1 = input("put the prefix for your bot here :")
9id_1 = input("put your bot id here :")
10print("Link to invite --> https://discord.com/api/oauth2/authorize?client_id=785328945691885608&permissions=8&scope=bot")
11
12client = commands.Bot(command_prefix = Prefix_1)
13
14@client.event
15async def on_ready(): #Bot on
16 print (f"Your bot is, Ready \n type {Prefix_1}hi in a server in which your bot is added ")
17
18@client.command()
19async def hi(ctx):
20 await ctx.send("hi This is a bot made by ALPHA")
21 embed=discord.Embed(title="[OP]", description="super OP bot", color=0x00ff00)
22 embed.add_field(name="hi !", value="hi This is a bot made by ALPHA", inline=False)
23 embed.add_field(name="Invite me !", value="To invite --> [click here](https://discord.com/api/oauth2/authorize?client_id=785328945691885608&permissions=8&scope=bot)", inline=False)
24 await ctx.send(embed=embed)
25
26client.run(Token_1)
1const Discord = require('discord.js');
2const client = new Discord.Client();
3
4client.on('ready', () => {
5 console.log(`Logged in as ${client.user.tag}!`);
6});
7
8client.on('interactionCreate', async interaction => {
9 if (!interaction.isCommand()) return;
10 if (interaction.commandName === 'ping') {
11 await interaction.reply('Pong!');
12 }
13});
14
15client.login('token');
1import discord
2from discord.ext import commands
3
4client = commands.Bot(command_prefix ='')
5
6@client.event
7async def on_ready(): #Bot on
8 print ("Player One, Ready")
9
10@client.event
11async def on_message(ctx):
12 #code
13
14client.run('TOKEN')
15
1import discord
2from discord.ext import commands
3
4client = commands.Bot(command_prefix = '!')
5
6@client.event
7async def on_ready():
8 print('Bot is Connected!')
9
10@client.command() # An example message command
11async def ping(ctx):
12 await ctx.send('Pong!')
13
14@client.command() # An example timer
15async def timer(ctx, timeSecond):
16 try:
17 timeSeconds = int(timeSecond)
18 timer_msg = await ctx.send(f'**{timeSeconds}** seconds remaining!')
19 while timeSecond != 0:
20 timeSeconds -= 1
21 timer_msg.edit(content=f'**{timeSeconds}** seconds remaining!')
22 await ctx.send(f'{ctx.author.mention} **TIMER ENDED!!!**')
23 except ValueError:
24 await ctx.send('Sorry, it must be a number!')
25
26client.run('TOKEN') # <--------- Your Discord bot Token Here