Skip to content

Commit 7f3a3b3

Browse files
committed
Improve comment lines
1 parent dff489c commit 7f3a3b3

File tree

1 file changed

+7
-24
lines changed

1 file changed

+7
-24
lines changed

main.py

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Modules ###
1+
# Imports
22
import os
33
import time
44
import os.path
@@ -10,9 +10,8 @@
1010
from discord.ext import commands
1111
from discord.ext.commands import *
1212
from discord.ext import tasks
13-
### Modules end ###
1413

15-
### Startup/variables ###
14+
# Startup and Variables
1615
ids = [
1716
816941773032390676,
1817
738290097170153472,
@@ -46,17 +45,12 @@
4645
global startTime
4746
startTime = time.time()
4847
client.remove_command('help')
49-
### Startup\\variables end ###
50-
51-
### Command variables ###
5248
theme_color = 0xffbd59
5349
color_success = 0x77b255
5450
color_fail = 0xc92424
5551
rootdir = 'C://Users//dhruvbhat//OneDrive//Desktop//increment.io'
5652
loggerHandler_path = 'botLog/log.txt'
5753
errorHandler_path = 'botLog/errors.txt'
58-
### Functions and classes ###
59-
6054
correctnumber = {}
6155

6256
class colors:
@@ -90,9 +84,7 @@ def get_time():
9084
now = datetime.datetime.now()
9185
return now.strftime("%H:%M:%S")
9286

93-
### Functions and classes end ###
94-
95-
## Events ###
87+
# Events
9688
@client.event
9789
async def on_ready():
9890
if os.name == 'nt':
@@ -153,7 +145,7 @@ async def on_ready():
153145
print('Bot file size: ' + os.path.getsize(str(os.getcwd() + '\\main.py')))
154146
print('------------------')
155147

156-
# Error handler #
148+
# Error Handler
157149
@client.event
158150
async def on_command_error(ctx, error):
159151
now = datetime.datetime.now()
@@ -211,7 +203,6 @@ async def on_command_error(ctx, error):
211203
print(f'{colors.red}[{current_time}/WARN] Ignoring exception at BotMissingPremissions. Details: The bot doesn\'t have the required permissions.{colors.end}')
212204
else:
213205
pass
214-
# Error handler end #
215206

216207
snipe_message_author = {}
217208
snipe_message_content = {}
@@ -254,10 +245,7 @@ async def on_message(message):
254245
else: pass
255246
await client.process_commands(message)
256247

257-
### Events end ###
258-
259-
### Commands ###
260-
248+
# Commands
261249
@client.command()
262250
async def uptime(ctx):
263251
uptime = str(datetime.timedelta(seconds=int(round(time.time()-startTime))))
@@ -289,10 +277,7 @@ async def serverstats(ctx):
289277
emb12.set_thumbnail(url=servericon)
290278
await ctx.send(embed = emb12)
291279

292-
## Moderation Commands End ##
293-
294-
## Count Commands ##
295-
280+
# Count Commands
296281
@client.command()
297282
@commands.has_permissions(administrator = True)
298283
async def setchannel(ctx):
@@ -334,8 +319,6 @@ async def resetcount(ctx):
334319
savedata()
335320
await ctx.reply(':white_check_mark: Count successfully reset back to `1`')
336321

337-
## Count Commands End ##
338-
339-
### Commands end ###
322+
# Client initialization
340323
keep_alive()
341324
client.run('') # Insert your bot token here

0 commit comments

Comments
 (0)