Skip to content

Commit dff489c

Browse files
authored
Merge pull request #1 from PyBotDevs/improve-code-quality
Remove redundant fstrings in source
2 parents 679b7f9 + 8af493f commit dff489c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

main.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
color_success = 0x77b255
5454
color_fail = 0xc92424
5555
rootdir = 'C://Users//dhruvbhat//OneDrive//Desktop//increment.io'
56-
loggerHandler_path = f'botLog/log.txt'
57-
errorHandler_path = f'botLog/errors.txt'
56+
loggerHandler_path = 'botLog/log.txt'
57+
errorHandler_path = 'botLog/errors.txt'
5858
### Functions and classes ###
5959

6060
correctnumber = {}
@@ -65,25 +65,25 @@ class colors:
6565
green = '\033[92m'
6666
end = '\033[0m'
6767

68-
with open(f'database/count.json', 'r') as f:
68+
with open('database/count.json', 'r') as f:
6969
global count
7070
count = json.load(f)
71-
with open(f'database/configuration/countchannel.json', 'r') as f:
71+
with open('database/configuration/countchannel.json', 'r') as f:
7272
global countchannel
7373
countchannel = json.load(f)
74-
with open(f'database/configuration/warning.json', 'r') as f:
74+
with open('database/configuration/warning.json', 'r') as f:
7575
global warnmsg
7676
warnmsg = json.load(f)
77-
with open(f'database/configuration/autoreactions.json', 'r') as f:
77+
with open('database/configuration/autoreactions.json', 'r') as f:
7878
global autoreactions
7979
autoreactions = json.load(f)
8080

8181
def savedata():
82-
with open(f'database/count.json', 'w+') as f:
82+
with open('database/count.json', 'w+') as f:
8383
json.dump(count, f)
84-
with open(f'database/configuration/countchannel.json', 'w+') as f:
84+
with open('database/configuration/countchannel.json', 'w+') as f:
8585
json.dump(countchannel, f)
86-
with open(f'database/configuration/autoreactions.json', 'w+') as f:
86+
with open('database/configuration/autoreactions.json', 'w+') as f:
8787
json.dump(autoreactions, f)
8888

8989
def get_time():
@@ -307,13 +307,13 @@ async def setchannel(ctx):
307307
@commands.has_permissions(administrator = True)
308308
async def reactions(ctx, setting:str):
309309
if setting == 'on':
310-
if autoreactions[str(ctx.guild.id)] == 1: await ctx.send(f':warning: This feature is already enabled.')
310+
if autoreactions[str(ctx.guild.id)] == 1: await ctx.send(':warning: This feature is already enabled.')
311311
else:
312312
autoreactions[str(ctx.guild.id)] = 1
313313
savedata()
314314
await ctx.send(f':white_check_mark: Turned **on** count reactions.')
315315
elif setting == 'off':
316-
if autoreactions[str(ctx.guild.id)] == 0: await ctx.send(f':warning: This feature is already disabled')
316+
if autoreactions[str(ctx.guild.id)] == 0: await ctx.send(':warning: This feature is already disabled')
317317
else:
318318
autoreactions[str(ctx.guild.id)] = 0
319319
savedata()

0 commit comments

Comments
 (0)