Skip to content

Commit abff685

Browse files
committed
Fix issues with update
1 parent e7c479c commit abff685

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

.bandit_baseline.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"errors": [],
33
"generated_at": "2020-11-12T15:17:38Z",
44
"metrics": {
5-
".\\bot.py": {
5+
"./bot.py": {
66
"CONFIDENCE.HIGH": 1.0,
77
"CONFIDENCE.LOW": 0.0,
88
"CONFIDENCE.MEDIUM": 0.0,
@@ -14,7 +14,7 @@
1414
"loc": 1264,
1515
"nosec": 0
1616
},
17-
".\\cogs\\modmail.py": {
17+
"./cogs/modmail.py": {
1818
"CONFIDENCE.HIGH": 0.0,
1919
"CONFIDENCE.LOW": 0.0,
2020
"CONFIDENCE.MEDIUM": 0.0,
@@ -26,7 +26,7 @@
2626
"loc": 1280,
2727
"nosec": 0
2828
},
29-
".\\cogs\\plugins.py": {
29+
"./cogs/plugins.py": {
3030
"CONFIDENCE.HIGH": 1.0,
3131
"CONFIDENCE.LOW": 0.0,
3232
"CONFIDENCE.MEDIUM": 0.0,
@@ -38,7 +38,7 @@
3838
"loc": 572,
3939
"nosec": 0
4040
},
41-
".\\cogs\\utility.py": {
41+
"./cogs/utility.py": {
4242
"CONFIDENCE.HIGH": 2.0,
4343
"CONFIDENCE.LOW": 0.0,
4444
"CONFIDENCE.MEDIUM": 0.0,
@@ -50,7 +50,7 @@
5050
"loc": 1710,
5151
"nosec": 0
5252
},
53-
".\\core\\_color_data.py": {
53+
"./core/_color_data.py": {
5454
"CONFIDENCE.HIGH": 0.0,
5555
"CONFIDENCE.LOW": 0.0,
5656
"CONFIDENCE.MEDIUM": 0.0,
@@ -62,7 +62,7 @@
6262
"loc": 1166,
6363
"nosec": 0
6464
},
65-
".\\core\\changelog.py": {
65+
"./core/changelog.py": {
6666
"CONFIDENCE.HIGH": 0.0,
6767
"CONFIDENCE.LOW": 0.0,
6868
"CONFIDENCE.MEDIUM": 0.0,
@@ -74,7 +74,7 @@
7474
"loc": 145,
7575
"nosec": 0
7676
},
77-
".\\core\\checks.py": {
77+
"./core/checks.py": {
7878
"CONFIDENCE.HIGH": 0.0,
7979
"CONFIDENCE.LOW": 0.0,
8080
"CONFIDENCE.MEDIUM": 0.0,
@@ -86,7 +86,7 @@
8686
"loc": 89,
8787
"nosec": 0
8888
},
89-
".\\core\\clients.py": {
89+
"./core/clients.py": {
9090
"CONFIDENCE.HIGH": 0.0,
9191
"CONFIDENCE.LOW": 0.0,
9292
"CONFIDENCE.MEDIUM": 1.0,
@@ -98,7 +98,7 @@
9898
"loc": 585,
9999
"nosec": 0
100100
},
101-
".\\core\\config.py": {
101+
"./core/config.py": {
102102
"CONFIDENCE.HIGH": 0.0,
103103
"CONFIDENCE.LOW": 0.0,
104104
"CONFIDENCE.MEDIUM": 0.0,
@@ -110,7 +110,7 @@
110110
"loc": 327,
111111
"nosec": 0
112112
},
113-
".\\core\\decorators.py": {
113+
"./core/decorators.py": {
114114
"CONFIDENCE.HIGH": 0.0,
115115
"CONFIDENCE.LOW": 0.0,
116116
"CONFIDENCE.MEDIUM": 0.0,
@@ -122,7 +122,7 @@
122122
"loc": 9,
123123
"nosec": 0
124124
},
125-
".\\core\\models.py": {
125+
"./core/models.py": {
126126
"CONFIDENCE.HIGH": 0.0,
127127
"CONFIDENCE.LOW": 0.0,
128128
"CONFIDENCE.MEDIUM": 0.0,
@@ -134,7 +134,7 @@
134134
"loc": 199,
135135
"nosec": 0
136136
},
137-
".\\core\\paginator.py": {
137+
"./core/paginator.py": {
138138
"CONFIDENCE.HIGH": 0.0,
139139
"CONFIDENCE.LOW": 0.0,
140140
"CONFIDENCE.MEDIUM": 0.0,
@@ -146,7 +146,7 @@
146146
"loc": 209,
147147
"nosec": 0
148148
},
149-
".\\core\\thread.py": {
149+
"./core/thread.py": {
150150
"CONFIDENCE.HIGH": 0.0,
151151
"CONFIDENCE.LOW": 0.0,
152152
"CONFIDENCE.MEDIUM": 0.0,
@@ -158,7 +158,7 @@
158158
"loc": 993,
159159
"nosec": 0
160160
},
161-
".\\core\\time.py": {
161+
"./core/time.py": {
162162
"CONFIDENCE.HIGH": 0.0,
163163
"CONFIDENCE.LOW": 0.0,
164164
"CONFIDENCE.MEDIUM": 0.0,
@@ -170,7 +170,7 @@
170170
"loc": 158,
171171
"nosec": 0
172172
},
173-
".\\core\\utils.py": {
173+
"./core/utils.py": {
174174
"CONFIDENCE.HIGH": 0.0,
175175
"CONFIDENCE.LOW": 0.0,
176176
"CONFIDENCE.MEDIUM": 0.0,
@@ -198,7 +198,7 @@
198198
"results": [
199199
{
200200
"code": "11 from datetime import datetime\n12 from subprocess import PIPE\n13 from types import SimpleNamespace\n",
201-
"filename": ".\\bot.py",
201+
"filename": "./bot.py",
202202
"issue_confidence": "HIGH",
203203
"issue_severity": "LOW",
204204
"issue_text": "Consider possible security implications associated with PIPE module.",
@@ -212,7 +212,7 @@
212212
},
213213
{
214214
"code": "13 from site import USER_SITE\n14 from subprocess import PIPE\n15 \n16 import discord\n",
215-
"filename": ".\\cogs\\plugins.py",
215+
"filename": "./cogs/plugins.py",
216216
"issue_confidence": "HIGH",
217217
"issue_severity": "LOW",
218218
"issue_text": "Consider possible security implications associated with PIPE module.",
@@ -227,7 +227,7 @@
227227
},
228228
{
229229
"code": "12 from json import JSONDecodeError, loads\n13 from subprocess import PIPE\n14 from textwrap import indent\n",
230-
"filename": ".\\cogs\\utility.py",
230+
"filename": "./cogs/utility.py",
231231
"issue_confidence": "HIGH",
232232
"issue_severity": "LOW",
233233
"issue_text": "Consider possible security implications associated with PIPE module.",
@@ -241,7 +241,7 @@
241241
},
242242
{
243243
"code": "1985 try:\n1986 exec(to_compile, env) # pylint: disable=exec-used\n1987 except Exception as exc:\n",
244-
"filename": ".\\cogs\\utility.py",
244+
"filename": "./cogs/utility.py",
245245
"issue_confidence": "HIGH",
246246
"issue_severity": "MEDIUM",
247247
"issue_text": "Use of exec detected.",
@@ -255,7 +255,7 @@
255255
},
256256
{
257257
"code": "68 \n69 def __init__(self, bot, access_token: str = \"\", username: str = \"\", **kwargs):\n70 self.bot = bot\n71 self.session = bot.session\n72 self.headers: dict = None\n73 self.access_token = access_token\n74 self.username = username\n75 self.avatar_url: str = kwargs.pop(\"avatar_url\", \"\")\n76 self.url: str = kwargs.pop(\"url\", \"\")\n77 if self.access_token:\n78 self.headers = {\"Authorization\": \"token \" + str(access_token)}\n79 \n80 async def request(\n",
258-
"filename": ".\\core\\clients.py",
258+
"filename": "./core/clients.py",
259259
"issue_confidence": "MEDIUM",
260260
"issue_severity": "LOW",
261261
"issue_text": "Possible hardcoded password: ''",

cogs/utility.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1928,17 +1928,19 @@ async def update(self, ctx, *, flag: str = ""):
19281928
logger.info("Bot has been updated.")
19291929
if self.bot.hosting_method == HostingMethod.PM2:
19301930
embed = discord.Embed(
1931-
title="Bot has been updated", color=self.bot.main_color
1931+
title="Bot has been updated",
1932+
description=f"Version: {latest.version}",
1933+
color=self.bot.main_color,
19321934
)
19331935
await ctx.send(embed=embed)
19341936
else:
19351937
embed = discord.Embed(
19361938
title="Bot has been updated and is logging out.",
1937-
description="If you do not have an auto-restart setup, please manually start the bot.",
1939+
description=f"Version: {latest.version}\nIf you do not have an auto-restart setup, please manually start the bot.",
19381940
color=self.bot.main_color,
19391941
)
19401942
await ctx.send(embed=embed)
1941-
await self.bot.logout()
1943+
await self.bot.logout()
19421944
else:
19431945
embed = discord.Embed(title="Already up to date.", color=self.bot.main_color,)
19441946
await ctx.send(embed=embed)

0 commit comments

Comments
 (0)