fixed .temprole not giving the role

This commit is contained in:
Toastie 2025-01-29 20:09:01 +13:00
parent ddd3441771
commit cf9f100f8d
Signed by: toastie_t0ast
GPG key ID: 0861BE54AD481DC7
4 changed files with 13 additions and 5 deletions

View file

@ -2,6 +2,13 @@
Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o
## [5.3.8] - 29.01.2025
## Fixed
- `.temprole` now correctly adds a role
- `.h temprole` also shows the correct overload now
## [5.3.7] - 21.01.2025
## Changed

View file

@ -4,7 +4,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>true</ImplicitUsings>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<Version>5.3.7</Version>
<Version>5.3.8</Version>
<!-- Output/build -->
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>

View file

@ -221,7 +221,7 @@ public partial class Administration
[RequireContext(ContextType.Guild)]
[UserPerm(GuildPerm.Administrator)]
[BotPerm(GuildPerm.ManageRoles)]
public async Task TempRole(ParsedTimespan timespan, IUser user, [Leftover] IRole role)
public async Task TempRole(ParsedTimespan timespan, IGuildUser user, [Leftover] IRole role)
{
if (!await CheckRoleHierarchy(role))
{
@ -231,6 +231,7 @@ public partial class Administration
return;
}
await user.AddRoleAsync(role);
await _tempRoleService.AddTempRoleAsync(ctx.Guild.Id, role.Id, user.Id, timespan.Time);

View file

@ -4852,11 +4852,11 @@ temprole:
- '15m @User Jail'
- '7d @Newbie Trial Member'
params:
- days:
- time:
desc: "The time after which the role is automatically removed."
- user:
user:
desc: "The user to give the role to."
- role:
role:
desc: "The role to give to the user."
minesweeper:
desc: |-