fixed .temprole not giving the role
This commit is contained in:
parent
ddd3441771
commit
cf9f100f8d
4 changed files with 13 additions and 5 deletions
|
@ -2,6 +2,13 @@
|
||||||
|
|
||||||
Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o
|
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
|
## [5.3.7] - 21.01.2025
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>true</ImplicitUsings>
|
<ImplicitUsings>true</ImplicitUsings>
|
||||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||||
<Version>5.3.7</Version>
|
<Version>5.3.8</Version>
|
||||||
|
|
||||||
<!-- Output/build -->
|
<!-- Output/build -->
|
||||||
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
|
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
|
||||||
|
|
|
@ -221,7 +221,7 @@ public partial class Administration
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[UserPerm(GuildPerm.Administrator)]
|
[UserPerm(GuildPerm.Administrator)]
|
||||||
[BotPerm(GuildPerm.ManageRoles)]
|
[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))
|
if (!await CheckRoleHierarchy(role))
|
||||||
{
|
{
|
||||||
|
@ -231,6 +231,7 @@ public partial class Administration
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await user.AddRoleAsync(role);
|
||||||
await _tempRoleService.AddTempRoleAsync(ctx.Guild.Id, role.Id, user.Id, timespan.Time);
|
await _tempRoleService.AddTempRoleAsync(ctx.Guild.Id, role.Id, user.Id, timespan.Time);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4852,11 +4852,11 @@ temprole:
|
||||||
- '15m @User Jail'
|
- '15m @User Jail'
|
||||||
- '7d @Newbie Trial Member'
|
- '7d @Newbie Trial Member'
|
||||||
params:
|
params:
|
||||||
- days:
|
- time:
|
||||||
desc: "The time after which the role is automatically removed."
|
desc: "The time after which the role is automatically removed."
|
||||||
- user:
|
user:
|
||||||
desc: "The user to give the role to."
|
desc: "The user to give the role to."
|
||||||
- role:
|
role:
|
||||||
desc: "The role to give to the user."
|
desc: "The role to give to the user."
|
||||||
minesweeper:
|
minesweeper:
|
||||||
desc: |-
|
desc: |-
|
||||||
|
|
Loading…
Add table
Reference in a new issue