get_user_info -> fetch_user #46
This commit is contained in:
parent
aafcdc30f2
commit
3bc58e6e11
2 changed files with 3 additions and 3 deletions
|
@ -193,7 +193,7 @@ class Mod(Cog):
|
|||
@commands.command(aliases=["softban"])
|
||||
async def hackban(self, ctx, target: int, *, reason: str = ""):
|
||||
"""Bans a user with their ID, doesn't message them, staff only."""
|
||||
target_user = await self.bot.get_user_info(target)
|
||||
target_user = await self.bot.fetch_user(target)
|
||||
target_member = ctx.guild.get_member(target)
|
||||
# Hedge-proofing the code
|
||||
if target == ctx.author.id:
|
||||
|
|
|
@ -61,7 +61,7 @@ class Robocronp(Cog):
|
|||
try:
|
||||
job_details = ctab[jobtype][timestamp][job_name]
|
||||
if jobtype == "unban":
|
||||
target_user = await self.bot.get_user_info(job_name)
|
||||
target_user = await self.bot.fetch_user(job_name)
|
||||
target_guild = self.bot.get_guild(job_details["guild"])
|
||||
delete_job(timestamp, jobtype, job_name)
|
||||
await target_guild.unban(target_user,
|
||||
|
@ -79,7 +79,7 @@ class Robocronp(Cog):
|
|||
elif jobtype == "remind":
|
||||
text = job_details["text"]
|
||||
added_on = job_details["added"]
|
||||
target = await self.bot.get_user_info(int(job_name))
|
||||
target = await self.bot.fetch_user(int(job_name))
|
||||
if target:
|
||||
await target.send("You asked to be reminded about"
|
||||
f" `{text}` on {added_on}.")
|
||||
|
|
Loading…
Reference in a new issue