WIP: Refactor Aurora (3.0.0) #29
2 changed files with 4 additions and 4 deletions
|
@ -47,7 +47,7 @@ class Aurora(commands.Cog):
|
||||||
This cog stores all of its data in an SQLite database."""
|
This cog stores all of its data in an SQLite database."""
|
||||||
|
|
||||||
__author__ = ["Seaswimmer"]
|
__author__ = ["Seaswimmer"]
|
||||||
__version__ = "3.0.0-indev2"
|
__version__ = "3.0.0-indev3"
|
||||||
__documentation__ = "https://seacogs.coastalcommits.com/aurora/"
|
__documentation__ = "https://seacogs.coastalcommits.com/aurora/"
|
||||||
|
|
||||||
async def red_delete_data_for_user(self, *, requester, user_id: int):
|
async def red_delete_data_for_user(self, *, requester, user_id: int):
|
||||||
|
|
|
@ -244,7 +244,7 @@ class AddRole(Type):
|
||||||
target = moderation.bot.get_user(moderation.target_id)
|
target = moderation.bot.get_user(moderation.target_id)
|
||||||
if not target:
|
if not target:
|
||||||
try:
|
try:
|
||||||
await moderation.guild.fetch_member(moderation.target_id)
|
target = await moderation.guild.fetch_member(moderation.target_id)
|
||||||
except NotFound:
|
except NotFound:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
@ -417,7 +417,7 @@ class RemoveRole(Type):
|
||||||
target = moderation.bot.get_user(moderation.target_id)
|
target = moderation.bot.get_user(moderation.target_id)
|
||||||
if not target:
|
if not target:
|
||||||
try:
|
try:
|
||||||
await moderation.guild.fetch_member(moderation.target_id)
|
target = await moderation.guild.fetch_member(moderation.target_id)
|
||||||
except NotFound:
|
except NotFound:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
@ -894,7 +894,7 @@ class Tempban(Ban):
|
||||||
target = moderation.bot.get_user(moderation.target_id)
|
target = moderation.bot.get_user(moderation.target_id)
|
||||||
if not target:
|
if not target:
|
||||||
try:
|
try:
|
||||||
await moderation.bot.fetch_user(moderation.target_id)
|
target = await moderation.bot.fetch_user(moderation.target_id)
|
||||||
except NotFound:
|
except NotFound:
|
||||||
return 0
|
return 0
|
||||||
await moderation.guild.unban(user=target, reason=reason)
|
await moderation.guild.unban(user=target, reason=reason)
|
||||||
|
|
Loading…
Reference in a new issue