mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
- More code cleanup and codestyle updates
- Fixed some possible nullref exceptions - Methods signatures now have up to 3 parameters before breakaing down each parameter in a separate line - Method invocations have the same rule, except the first parameter will be in the same line as the invocation to prevent some ugliness when passing lambas as arguments - Applied many more codestyles - Extensions folder fully reformatted
This commit is contained in:
@@ -82,6 +82,7 @@ public class Help : NadekoModule<HelpService>
|
||||
|
||||
localModules
|
||||
.OrderBy(module => module.Name)
|
||||
.ToList()
|
||||
.ForEach(module => embed.AddField($"{GetModuleEmoji(module.Name)} {module.Name}",
|
||||
GetText(GetModuleLocStr(module.Name)) + "\n" +
|
||||
Format.Code(GetText(strs.module_footer(Prefix, module.Name.ToLowerInvariant()))),
|
||||
@@ -406,17 +407,13 @@ public class Help : NadekoModule<HelpService>
|
||||
|
||||
[NadekoCommand, Aliases]
|
||||
public async Task Guide()
|
||||
{
|
||||
await ConfirmLocalizedAsync(strs.guide(
|
||||
=> await ConfirmLocalizedAsync(strs.guide(
|
||||
"https://nadeko.bot/commands",
|
||||
"http://nadekobot.readthedocs.io/en/latest/"));
|
||||
}
|
||||
|
||||
[NadekoCommand, Aliases]
|
||||
public async Task Donate()
|
||||
{
|
||||
await ReplyConfirmLocalizedAsync(strs.donate(PatreonUrl, PaypalUrl));
|
||||
}
|
||||
=> await ReplyConfirmLocalizedAsync(strs.donate(PatreonUrl, PaypalUrl));
|
||||
}
|
||||
|
||||
internal class CommandJsonObject
|
||||
|
@@ -154,16 +154,12 @@ public class HelpService : ILateExecutor, INService
|
||||
}
|
||||
|
||||
public static string GetPreconditionString(ChannelPerm perm)
|
||||
{
|
||||
return (perm.ToString() + " Channel Permission")
|
||||
=> (perm.ToString() + " Channel Permission")
|
||||
.Replace("Guild", "Server", StringComparison.InvariantCulture);
|
||||
}
|
||||
|
||||
public static string GetPreconditionString(GuildPerm perm)
|
||||
{
|
||||
return (perm.ToString() + " Server Permission")
|
||||
=> (perm.ToString() + " Server Permission")
|
||||
.Replace("Guild", "Server", StringComparison.InvariantCulture);
|
||||
}
|
||||
|
||||
private string GetText(LocStr str, IGuild guild, params object[] replacements) =>
|
||||
_strings.GetText(str, guild?.Id);
|
||||
|
Reference in New Issue
Block a user