-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
49 lines (41 loc) · 1.44 KB
/
main.py
File metadata and controls
49 lines (41 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import discord
import random
from discord.ext import commands, tasks
from discord.ext.commands import Bot
TOKEN = '' # paste your bots token inside the ''
__version__ = '0.0.1'
bot = commands.Bot(command_prefix=commands.when_mentioned_or('src!'), help_command=None)
@bot.event
async def on_ready():
change_staus.start()
print('The bot is running!')
if bot.user.id == userid: #put your user ID here or else the code isnt going to work u dont need '' or "" for this
bot.dev = True
else:
bot.dev = False
print('Logged in as..')
print(f'Bot-Name: {bot.user.name}')
print(f'Bot-ID: {bot.user.id}')
print(f'Dev Mode: {bot.dev}')
print(f'Discord Version: {discord.__version__}')
print(f'Bot Version: {__version__}')
bot.AppInfo = await bot.application_info()
print(f'Owner: {bot.AppInfo.owner}')
print('------')
@tasks.loop(seconds=180)
async def change_staus():
status = [
'github', 'src!', 'https://github.com/PythonJoshua',
'Open Source by j_#1770', 'HmMmMm'
]
await bot.change_presence(activity=discord.Game(random.choice(status)))
@bot.command()
async def src(ctx):
embed = discord.Embed(
title="Open Source by github.com/pythonjoshua",
description="bot",
colour=ctx.author.colour # remove my credits means stupid
) # code by github.com/pythonjoshua
embed.set_footer(text="Open SRC")
await ctx.send(embed=embed)
bot.run(TOKEN)