Skip to content

Commit 9fb73b1

Browse files
authored
New Console
Added more helpful things in the console to aid me with supporting people and not having to make them run a bunch of commands, plus now you can easily invite your bot.
1 parent 2868ff8 commit 9fb73b1

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Basic Bot.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1-
# These are the dependecies. The bot depends on these to function, hence the name. Please do not change these unless your adding to them.
1+
# These are the dependecies. The bot depends on these to function, hence the name. Please do not change these unless your adding to them, because they can break the bot.
22
import discord
33
import asyncio
44
from discord.ext.commands import Bot
55
from discord.ext import commands
6+
import platform
67

78
# Here you can modify the bot's prefix and description and wether it sends help in direct messages or not.
89
client = Bot(description="Basic Bot by Habchy#1665", command_prefix="PUT YOUR PREFIX HERE", pm_help = True)
910

1011
# This is what happens everytime the bot launches. In this case, it prints information like server count, user count the bot is connected to, and the bot id in the console.
12+
# Do not mess with it because the bot can break, if you wish to do so, please consult me or someone trusted.
1113
@client.event
1214
async def on_ready():
1315
print('Logged in as '+client.user.name+' (ID:'+client.user.id+') | Connected to '+str(len(client.servers))+' servers | Connected to '+str(len(set(client.get_all_members())))+' users')
1416
print('--------')
17+
print('Current Discord.py Version: {} | Current Python Version: {}'.format(discord.__version__, platform.python_version()))
18+
print('--------')
19+
print('Use this link to invite {}:'.format(client.user.name))
20+
print('https://discordapp.com/oauth2/authorize?client_id={}&scope=bot&permissions=0'.format(client.user.id))
21+
print('--------')
1522
print('Support Discord Server: https://discord.gg/FNNNgqb')
23+
print('Github Link: https://github.com/Habchy/BasicBot')
1624
print('--------')
1725
print('Created by Habchy#1665')
1826

@@ -23,15 +31,15 @@ async def ping(*args):
2331
await client.say(":ping_pong: Pong!")
2432
await asyncio.sleep(3)
2533
await client.say(":warning: This bot was created by **Habchy#1665**, it seems that you have not modified it yet. Go edit the file and try it out!")
26-
# After you have modified the code, feel free to delete the line above (line 25) so it does not keep popping up everytime you initiate the ping commmand.
34+
# After you have modified the code, feel free to delete the line above (line 33) so it does not keep popping up everytime you initiate the ping commmand.
2735

2836
client.run('PUT YOUR BOT TOKEN HERE')
2937

3038
# Basic Bot was created by Habchy#1665
3139
# Please join this Discord server if you need help: https://discord.gg/FNNNgqb
3240
# Please modify the parts of the code where it asks you to. Example: The Prefix or The Bot Token
3341
# This is by no means a full bot, it's more of a starter to show you what the python language can do in Discord.
34-
# Thank you for using this and don't forget to star my repo on GitHub!
42+
# Thank you for using this and don't forget to star my repo on GitHub! [Repo Link: https://github.com/Habchy/BasicBot]
3543

3644
# The help command is currently set to be Direct Messaged.
3745
# If you would like to change that, change "pm_help = True" to "pm_help = False" on line 14.

0 commit comments

Comments
 (0)