Skip to content

Commit ee9798d

Browse files
authored
Open Source Discord BOT
Made for education, this is maintained and is under the MIT License
1 parent 65ad800 commit ee9798d

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

discord.py

+50-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,50 @@
1-
# Code here:
1+
import discord
2+
import random
3+
import asyncio
4+
from discord.ext import commands, tasks
5+
from discord.ext.commands import Bot
6+
7+
__version__ = '0.0.1'
8+
9+
pr = ['src!']
10+
bot = commands.Bot(command_prefix=pr)
11+
bot.remove_command('help')
12+
13+
@bot.event
14+
async def on_ready():
15+
change_staus.start()
16+
print('The bot is running!')
17+
if bot.user.id == userid: #put your user ID here or else the code isnt going to work u dont need '' or "" for this
18+
bot.dev = True
19+
else:
20+
bot.dev = False
21+
22+
print('Logged in as..')
23+
print(f'Bot-Name: {bot.user.name}')
24+
print(f'Bot-ID: {bot.user.id}')
25+
print(f'Dev Mode: {bot.dev}')
26+
print(f'Discord Version: {discord.__version__}')
27+
print(f'Bot Version: {__version__}')
28+
bot.AppInfo = await bot.application_info()
29+
print(f'Owner: {bot.AppInfo.owner}')
30+
print('------')
31+
32+
@tasks.loop(seconds=5)
33+
async def change_staus():
34+
status = [
35+
'github', 'src!', 'https://github.com/PythonJoshua',
36+
'Open Source by 7o_#9066', 'HmMmMm'
37+
]
38+
await bot.change_presence(activity=discord.Game(random.choice(status)))
39+
40+
@bot.command()
41+
async def src(ctx):
42+
embed = discord.Embed(
43+
title="Open Source by 7o_#9066",
44+
description="bot",
45+
colour=ctx.author.colour # remove my credits means stupid
46+
) # code by 7o_#9066
47+
embed.set_footer(text="Open SRC")
48+
await ctx.send(embed=embed)
49+
50+
bot.run("token here")

0 commit comments

Comments
 (0)