WIP: Refactor Aurora (3.0.0) #29
1 changed files with 2 additions and 2 deletions
|
@ -243,7 +243,7 @@ class AddRole(Type):
|
||||||
@classmethod
|
@classmethod
|
||||||
async def expiry_handler(cls, moderation: Moderation) -> int:
|
async def expiry_handler(cls, moderation: Moderation) -> int:
|
||||||
try:
|
try:
|
||||||
target = moderation.bot.get_user(moderation.target_id)
|
target = moderation.guild.get_member(moderation.target_id)
|
||||||
if not target:
|
if not target:
|
||||||
try:
|
try:
|
||||||
target = await moderation.guild.fetch_member(moderation.target_id)
|
target = await moderation.guild.fetch_member(moderation.target_id)
|
||||||
|
@ -418,7 +418,7 @@ class RemoveRole(Type):
|
||||||
@classmethod
|
@classmethod
|
||||||
async def expiry_handler(cls, moderation: Moderation) -> int:
|
async def expiry_handler(cls, moderation: Moderation) -> int:
|
||||||
try:
|
try:
|
||||||
target = moderation.bot.get_user(moderation.target_id)
|
target = moderation.guild.get_member(moderation.target_id)
|
||||||
if not target:
|
if not target:
|
||||||
try:
|
try:
|
||||||
target = await moderation.guild.fetch_member(moderation.target_id)
|
target = await moderation.guild.fetch_member(moderation.target_id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue