fix: fixed .temprole not giving the role

This commit is contained in:
Kwoth
2025-01-27 19:57:11 +00:00
parent fddd0f2340
commit 40f1774655
4 changed files with 13 additions and 5 deletions

View File

@@ -2,6 +2,13 @@
Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o
## [5.3.8] - 27.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

@@ -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

@@ -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

@@ -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: |-