Skip to content

Commit 740cf1c

Browse files
committed
Fix bugs
1 parent e0fc603 commit 740cf1c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,10 @@ async def update(self, ctx):
343343
color=discord.Color.green()
344344
)
345345

346-
oauth_url = f'https://github.com/login/oauth/authorize?client_id=e54e4ff0f234ee9f22aa&scope=public_repo&redirect_uri=https://api.kybr.tk/api/modmail/github/callback?user_id={self.user.id}'
346+
oauth_url = f'https://github.com/login/oauth/authorize?client_id=e54e4ff0f234ee9f22aa&scope=public_repo&redirect_uri=https://api.kybr.tk/modmail/github/callback?user_id={self.user.id}'
347347

348348
if data['latest_version'] == __version__:
349-
async with self.session.get(f'https://api.kybr.tk/api/modmail/github/user/{self.user.id}') as resp:
349+
async with self.session.get(f'https://api.kybr.tk/modmail/github/user/{self.user.id}') as resp:
350350
if resp.status == 403:
351351
em.title = 'Unauthorised'
352352
em.description = 'You have not authorised modmail. '\
@@ -365,7 +365,7 @@ async def update(self, ctx):
365365
em.set_author(name=new_commit['user']['username'], icon_url=new_commit['user']['avatar_url'], url=new_commit['user']['url'])
366366

367367
if data['latest_version'] != __version__:
368-
async with self.session.get(f'https://api.kybr.tk/api/modmail/github/pull/{self.user.id}') as resp:
368+
async with self.session.get(f'https://api.kybr.tk/modmail/github/pull/{self.user.id}') as resp:
369369
if resp.status == 403:
370370
em.title = 'Unauthorised'
371371
em.description = 'You have not authorised modmail. '\
@@ -392,7 +392,7 @@ async def update(self, ctx):
392392
message = commit_data['commit']['message']
393393
html_url = commit_data["html_url"]
394394
short_sha = commit_data['sha'][:6]
395-
em.add_field(name='Merge Commit', value=f'[`{short_sha}`]({html_url}) {message} - {user.username}')
395+
em.add_field(name='Merge Commit', value=f"[`{short_sha}`]({html_url}) {message} - {new_commit['user']['username']}")
396396
else:
397397
em.description = 'Already up to date with master repository.'
398398

0 commit comments

Comments
 (0)