Skip to content

Commit e82f25b

Browse files
committed
Manual merge from master, freezes packages in requirements.txt
2 parents 5d93d2e + af4bc7a commit e82f25b

File tree

6 files changed

+34
-24
lines changed

6 files changed

+34
-24
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
# v2.6.3
8+
9+
Fixed small issue in thread finding.
10+
11+
# v2.6.2
12+
13+
Fixed log urls for selfhosting users. (This shouldn't affect anyone)
14+
715
# v2.6.1
816

917
### Fixed

bot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SOFTWARE.
2323
"""
2424

25-
__version__ = '2.6.1'
25+
__version__ = '2.6.3'
2626

2727
import discord
2828
from discord.enums import ActivityType
@@ -483,6 +483,7 @@ async def data_loop(self):
483483
"owner_id": self.owner.id,
484484
"bot_id": self.user.id,
485485
"bot_name": str(self.user),
486+
"avatar_url": self.user.avatar_url,
486487
"guild_id": self.guild_id,
487488
"guild_name": self.guild.name,
488489
"member_count": len(self.guild.members),
@@ -491,7 +492,7 @@ async def data_loop(self):
491492
"latency": f'{self.ws.latency * 1000:.4f}',
492493
"version": self.version,
493494
"selfhosted": self.selfhosted,
494-
"last_updated": str(datetime.datetime.utcnow())
495+
"last_updated": str(datetime.utcnow())
495496
}
496497

497498
await self.modmail_api.post_metadata(data)

cogs/modmail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ async def move(self, ctx, *, category: discord.CategoryChannel):
128128
if not thread:
129129
return await ctx.send('This is not a modmail thread.')
130130

131-
await thread.channel.edit(category=category)
131+
await thread.channel.edit(category=category, sync_permissions=True)
132132
await ctx.message.add_reaction('✅')
133133

134134
async def send_scheduled_close_message(self, ctx, after, silent=False):

core/decorators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ async def wrapper(self, ctx, *args, **kwargs):
1616
def auth_required(func):
1717
@functools.wraps(func)
1818
async def wrapper(self, ctx, *args, **kwargs):
19-
if self.bot.selfhosted and \
20-
self.bot.config.get('github_access_token') or \
19+
if (self.bot.selfhosted and
20+
self.bot.config.get('github_access_token')) or \
2121
self.bot.config.get('modmail_api_token'):
2222
return await func(self, ctx, *args, **kwargs)
2323

core/thread.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ async def _close(self, closer, silent=False, delete_channel=True,
105105
return
106106

107107
if self.bot.selfhosted:
108-
log_url = f'{self.bot.config.log_url}/logs/{log_data["_id"]}'
108+
log_url = f"{self.bot.config.log_url}/logs/{log_data['key']}"
109109
else:
110-
log_url = f"https://logs.modmail.tk/{log_data['_id']}"
110+
log_url = f"https://logs.modmail.tk/{log_data['key']}"
111111

112112
user = self.recipient.mention if self.recipient else f'`{self.id}`'
113113

@@ -117,7 +117,7 @@ async def _close(self, closer, silent=False, delete_channel=True,
117117
else:
118118
sneak_peak = 'No content'
119119

120-
desc = f"{user} [`{log_data['_id']}`]({log_url}): {sneak_peak}"
120+
desc = f"{user} [`{log_data['key']}`]({log_url}): {sneak_peak}"
121121

122122
em = discord.Embed(description=desc, color=discord.Color.red())
123123

@@ -392,7 +392,8 @@ async def _find_from_channel(self, channel):
392392
if message.embeds:
393393
em = message.embeds[0]
394394
# TODO: use re.search instead
395-
matches = re.findall(r'User ID: (\d+)', em.footer.text)
395+
matches = re.findall(r'User ID: (\d+)',
396+
str(em.footer.text))
396397
if matches:
397398
user_id = int(matches[0])
398399
break

requirements.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
git+https://github.com/Rapptz/discord.py@rewrite
2-
colorama
3-
cachetools
4-
python-dateutil
5-
python-box
6-
colorthief
7-
emoji
8-
dhooks
9-
natural
10-
parsedatetime
11-
motor
12-
sanic
13-
dnspython
14-
aiohttp
15-
pymongo
1+
git+https://github.com/Rapptz/discord.py@7f4c57dd5ad20b7fa10aea485f674a4bc24b9547
2+
colorama==0.4.1
3+
cachetools==3.0.0
4+
python-dateutil==2.7.5
5+
python-box==3.2.3
6+
colorthief==0.2.1
7+
emoji==0.5.1
8+
dhooks==1.1.0
9+
natural==0.2.0
10+
parsedatetime==2.4
11+
motor==2.0.0
12+
sanic==18.12.0
13+
dnspython==1.16.0
14+
aiohttp==3.4.4
15+
pymongo==3.7.2

0 commit comments

Comments
 (0)