You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Basic Bot.py
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,16 @@
5
5
fromdiscord.extimportcommands
6
6
7
7
# Here you can modify the bot's prefix and description and wether it sends help in direct messages or not.
8
-
client=Bot(description="Basic Bot by Habchy#1665", command_prefix="PUT YOUR PREFIX HERE", pm_help=True)
8
+
client=Bot(description="Basic Bot by Habchy#1665", command_prefix="PUT YOUR PREFIX HERE", pm_help=True)
9
9
10
-
# This is what happens everytime the bot launches. In this case, it prints information like server countand bot id in the console.
10
+
# 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.
11
11
@client.event
12
12
asyncdefon_ready():
13
-
print('Logged in as '+client.user.name+' (ID:'+client.user.id+') | Connected to '+str(len(client.servers))+' servers')
13
+
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')
# This is a basic example of a call and response command. You tell it do "this" and it does it.
21
20
@client.command()
@@ -24,7 +23,7 @@ async def ping(*args):
24
23
awaitclient.say(":ping_pong: Pong!")
25
24
awaitasyncio.sleep(3)
26
25
awaitclient.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!")
27
-
# After you have modified the code, feel free to delete the line above (line 34) so it does not keep popping up everytime you initiate the ping commmand.
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.
0 commit comments