Changed some commands names to avoid conflicts
This commit is contained in:
parent
25a977545c
commit
524452e72e
@ -117,7 +117,7 @@ namespace NadekoBot.Modules.ClashOfClans
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task Claim(int number, int baseNumber, [Remainder] string other_name = null)
|
||||
public async Task BaseCall(int number, int baseNumber, [Remainder] string other_name = null)
|
||||
{
|
||||
var warsInfo = _service.GetWarInfo(Context.Guild, number);
|
||||
if (warsInfo == null || warsInfo.Item1.Count == 0)
|
||||
@ -144,21 +144,21 @@ namespace NadekoBot.Modules.ClashOfClans
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task ClaimFinish1(int number, int baseNumber = 0)
|
||||
public async Task CallFinish1(int number, int baseNumber = 0)
|
||||
{
|
||||
await FinishClaim(number, baseNumber - 1, 1);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task ClaimFinish2(int number, int baseNumber = 0)
|
||||
public async Task CallFinish2(int number, int baseNumber = 0)
|
||||
{
|
||||
await FinishClaim(number, baseNumber - 1, 2);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task ClaimFinish(int number, int baseNumber = 0)
|
||||
public async Task CallFinish(int number, int baseNumber = 0)
|
||||
{
|
||||
await FinishClaim(number, baseNumber - 1);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task ShuffleDeck()
|
||||
public async Task DeckShuffle()
|
||||
{
|
||||
//var channel = (ITextChannel)Context.Channel;
|
||||
|
||||
|
@ -493,7 +493,7 @@ namespace NadekoBot.Modules.Music
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[Priority(0)]
|
||||
public Task Remove(int num)
|
||||
public Task SongRemove(int num)
|
||||
{
|
||||
MusicPlayer musicPlayer;
|
||||
if ((musicPlayer = _music.GetPlayer(Context.Guild.Id)) == null)
|
||||
@ -508,7 +508,7 @@ namespace NadekoBot.Modules.Music
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[Priority(1)]
|
||||
public async Task Remove(string all)
|
||||
public async Task SongRemove(string all)
|
||||
{
|
||||
if (all.Trim().ToUpperInvariant() != "ALL")
|
||||
return;
|
||||
|
@ -667,7 +667,6 @@ namespace NadekoBot.Modules.Searches
|
||||
await Context.Channel.EmbedAsync(new EmbedBuilder().WithOkColor()
|
||||
.AddField(efb => efb.WithName("Username").WithValue(usr.ToString()).WithIsInline(false))
|
||||
.AddField(efb => efb.WithName("Avatar Url").WithValue(shortenedAvatarUrl).WithIsInline(false))
|
||||
//.AddField(efb => efb.WithName("Avatar Id").WithValue(usr.AvatarId).WithIsInline(false))
|
||||
.WithThumbnailUrl(avatarUrl), Context.User.Mention).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ namespace NadekoBot.Modules.Utility
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task SearchQuote(string keyword, [Remainder] string text)
|
||||
public async Task QuoteSearch(string keyword, [Remainder] string text)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(keyword) || string.IsNullOrWhiteSpace(text))
|
||||
return;
|
||||
|
@ -260,7 +260,7 @@ namespace NadekoBot.Modules.Utility
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task UserId(IGuildUser target = null)
|
||||
public async Task UserId([Remainder] IGuildUser target = null)
|
||||
{
|
||||
var usr = target ?? Context.User;
|
||||
await ReplyConfirmLocalized("userid", "🆔", Format.Bold(usr.ToString()),
|
||||
|
@ -25,6 +25,7 @@ using NadekoBot.Services.Administration;
|
||||
using NadekoBot.Services.Permissions;
|
||||
using NadekoBot.Services.Utility;
|
||||
using NadekoBot.Services.Help;
|
||||
using NadekoBot.Extensions;
|
||||
|
||||
namespace NadekoBot
|
||||
{
|
||||
@ -256,6 +257,15 @@ namespace NadekoBot
|
||||
await commandHandler.StartHandling().ConfigureAwait(false);
|
||||
|
||||
var _ = await CommandService.AddModulesAsync(this.GetType().GetTypeInfo().Assembly);
|
||||
|
||||
|
||||
//Console.WriteLine(string.Join(", ", CommandService.Commands
|
||||
// .Distinct(x => x.Name + x.Module.Name)
|
||||
// .SelectMany(x => x.Aliases)
|
||||
// .GroupBy(x => x)
|
||||
// .Where(x => x.Count() > 1)
|
||||
// .Select(x => x.Key + $"({x.Count()})")));
|
||||
|
||||
#if GLOBAL_NADEKO
|
||||
//unload modules which are not available on the public bot
|
||||
CommandService
|
||||
|
@ -550,13 +550,13 @@
|
||||
<value>`{0}cr Awesome Role`</value>
|
||||
</data>
|
||||
<data name="rolecolor_cmd" xml:space="preserve">
|
||||
<value>rolecolor rc</value>
|
||||
<value>rolecolor roleclr</value>
|
||||
</data>
|
||||
<data name="rolecolor_desc" xml:space="preserve">
|
||||
<value>Set a role's color to the hex or 0-255 rgb color value provided.</value>
|
||||
</data>
|
||||
<data name="rolecolor_usage" xml:space="preserve">
|
||||
<value>`{0}rc Admin 255 200 100` or `{0}rc Admin ffba55`</value>
|
||||
<value>`{0}roleclr Admin 255 200 100` or `{0}roleclr Admin ffba55`</value>
|
||||
</data>
|
||||
<data name="ban_cmd" xml:space="preserve">
|
||||
<value>ban b</value>
|
||||
@ -676,7 +676,7 @@
|
||||
<value>`{0}schn NewName`</value>
|
||||
</data>
|
||||
<data name="prune_cmd" xml:space="preserve">
|
||||
<value>prune clr</value>
|
||||
<value>prune clear</value>
|
||||
</data>
|
||||
<data name="prune_desc" xml:space="preserve">
|
||||
<value>`{0}prune` removes all Nadeko's messages in the last 100 messages. `{0}prune X` removes last `X` number of messages from the channel (up to 100). `{0}prune @Someone` removes all Someone's messages in the last 100 messages. `{0}prune @Someone X` removes last `X` number of 'Someone's' messages in the channel.</value>
|
||||
@ -871,7 +871,7 @@
|
||||
<value>Shows user ID.</value>
|
||||
</data>
|
||||
<data name="userid_usage" xml:space="preserve">
|
||||
<value>`{0}uid` or `{0}uid "@SomeGuy"`</value>
|
||||
<value>`{0}uid` or `{0}uid @SomeGuy`</value>
|
||||
</data>
|
||||
<data name="channelid_cmd" xml:space="preserve">
|
||||
<value>channelid cid</value>
|
||||
@ -1143,13 +1143,13 @@
|
||||
<data name="showquote_usage" xml:space="preserve">
|
||||
<value>`{0}.. abc`</value>
|
||||
</data>
|
||||
<data name="searchquote_cmd" xml:space="preserve">
|
||||
<data name="quotesearch_cmd" xml:space="preserve">
|
||||
<value>qsearch</value>
|
||||
</data>
|
||||
<data name="searchquote_desc" xml:space="preserve">
|
||||
<data name="quotesearch_desc" xml:space="preserve">
|
||||
<value>Shows a random quote for a keyword that contains any text specified in the search.</value>
|
||||
</data>
|
||||
<data name="searchquote_usage" xml:space="preserve">
|
||||
<data name="quotesearch_usage" xml:space="preserve">
|
||||
<value>`{0}qsearch keyword text`</value>
|
||||
</data>
|
||||
<data name="quoteid_cmd" xml:space="preserve">
|
||||
@ -1161,14 +1161,14 @@
|
||||
<data name="quoteid_usage" xml:space="preserve">
|
||||
<value>`{0}qid 123456`</value>
|
||||
</data>
|
||||
<data name="deletequote_cmd" xml:space="preserve">
|
||||
<value>deletequote delq</value>
|
||||
<data name="quotedelete_cmd" xml:space="preserve">
|
||||
<value>quotedel qdel</value>
|
||||
</data>
|
||||
<data name="deletequote_desc" xml:space="preserve">
|
||||
<data name="quotedelete_desc" xml:space="preserve">
|
||||
<value>Deletes a quote with the specified ID. You have to be either server Administrator or the creator of the quote to delete it.</value>
|
||||
</data>
|
||||
<data name="deletequote_usage" xml:space="preserve">
|
||||
<value>`{0}delq 123456`</value>
|
||||
<data name="quotedelete_usage" xml:space="preserve">
|
||||
<value>`{0}qdel 123456`</value>
|
||||
</data>
|
||||
<data name="draw_cmd" xml:space="preserve">
|
||||
<value>draw</value>
|
||||
@ -1180,13 +1180,13 @@
|
||||
<value>`{0}draw` or `{0}draw 5`</value>
|
||||
</data>
|
||||
<data name="shuffleplaylist_cmd" xml:space="preserve">
|
||||
<value>shuffle sh</value>
|
||||
<value>playlistshuffle plsh</value>
|
||||
</data>
|
||||
<data name="shuffleplaylist_desc" xml:space="preserve">
|
||||
<value>Shuffles the current playlist.</value>
|
||||
</data>
|
||||
<data name="shuffleplaylist_usage" xml:space="preserve">
|
||||
<value>`{0}sh`</value>
|
||||
<value>`{0}plsh`</value>
|
||||
</data>
|
||||
<data name="flip_cmd" xml:space="preserve">
|
||||
<value>flip</value>
|
||||
@ -1267,7 +1267,7 @@
|
||||
<value>Give someone a certain amount of currency.</value>
|
||||
</data>
|
||||
<data name="give_usage" xml:space="preserve">
|
||||
<value>`{0}give 1 "@SomeGuy"`</value>
|
||||
<value>`{0}give 1 @SomeGuy`</value>
|
||||
</data>
|
||||
<data name="award_cmd" xml:space="preserve">
|
||||
<value>award</value>
|
||||
@ -1285,7 +1285,7 @@
|
||||
<value>Takes a certain amount of currency from someone.</value>
|
||||
</data>
|
||||
<data name="take_usage" xml:space="preserve">
|
||||
<value>`{0}take 1 "@someguy"`</value>
|
||||
<value>`{0}take 1 @SomeGuy`</value>
|
||||
</data>
|
||||
<data name="betroll_cmd" xml:space="preserve">
|
||||
<value>betroll br</value>
|
||||
@ -1611,14 +1611,14 @@
|
||||
<data name="move_usage" xml:space="preserve">
|
||||
<value>`{0}mv`</value>
|
||||
</data>
|
||||
<data name="remove_cmd" xml:space="preserve">
|
||||
<value>remove rm</value>
|
||||
<data name="songremove_cmd" xml:space="preserve">
|
||||
<value>songremove srm</value>
|
||||
</data>
|
||||
<data name="remove_desc" xml:space="preserve">
|
||||
<value>Remove a song by its # in the queue, or 'all' to remove whole queue.</value>
|
||||
<value>Remove a song by its # in the queue, or 'all' to remove all songs from the queue.</value>
|
||||
</data>
|
||||
<data name="remove_usage" xml:space="preserve">
|
||||
<value>`{0}rm 5`</value>
|
||||
<value>`{0}srm 5`</value>
|
||||
</data>
|
||||
<data name="movesong_cmd" xml:space="preserve">
|
||||
<value>movesong ms</value>
|
||||
@ -2059,7 +2059,7 @@
|
||||
<value>Returns a Google reverse image search for someone's avatar.</value>
|
||||
</data>
|
||||
<data name="revav_usage" xml:space="preserve">
|
||||
<value>`{0}revav "@SomeGuy"`</value>
|
||||
<value>`{0}revav @SomeGuy`</value>
|
||||
</data>
|
||||
<data name="revimg_cmd" xml:space="preserve">
|
||||
<value>revimg</value>
|
||||
@ -2089,13 +2089,13 @@
|
||||
<value>`{0}wiki query`</value>
|
||||
</data>
|
||||
<data name="color_cmd" xml:space="preserve">
|
||||
<value>color clr</value>
|
||||
<value>color</value>
|
||||
</data>
|
||||
<data name="color_desc" xml:space="preserve">
|
||||
<value>Shows you what color corresponds to that hex.</value>
|
||||
</data>
|
||||
<data name="color_usage" xml:space="preserve">
|
||||
<value>`{0}clr 00ff00`</value>
|
||||
<value>`{0}color 00ff00`</value>
|
||||
</data>
|
||||
<data name="videocall_cmd" xml:space="preserve">
|
||||
<value>videocall</value>
|
||||
@ -2104,7 +2104,7 @@
|
||||
<value>Creates a private <http://www.appear.in> video call link for you and other mentioned people. The link is sent to mentioned people via a private message.</value>
|
||||
</data>
|
||||
<data name="videocall_usage" xml:space="preserve">
|
||||
<value>`{0}videocall "@SomeGuy"`</value>
|
||||
<value>`{0}videocall "@the First" "@Xyz"`</value>
|
||||
</data>
|
||||
<data name="avatar_cmd" xml:space="preserve">
|
||||
<value>avatar av</value>
|
||||
@ -2113,7 +2113,7 @@
|
||||
<value>Shows a mentioned person's avatar.</value>
|
||||
</data>
|
||||
<data name="avatar_usage" xml:space="preserve">
|
||||
<value>`{0}av "@SomeGuy"`</value>
|
||||
<value>`{0}av @SomeGuy`</value>
|
||||
</data>
|
||||
<data name="hentai_cmd" xml:space="preserve">
|
||||
<value>hentai</value>
|
||||
@ -2169,15 +2169,6 @@
|
||||
<data name="e621_usage" xml:space="preserve">
|
||||
<value>`{0}e621 yuri kissing`</value>
|
||||
</data>
|
||||
<data name="cp_cmd" xml:space="preserve">
|
||||
<value>cp</value>
|
||||
</data>
|
||||
<data name="cp_desc" xml:space="preserve">
|
||||
<value>We all know where this will lead you to.</value>
|
||||
</data>
|
||||
<data name="cp_usage" xml:space="preserve">
|
||||
<value>`{0}cp`</value>
|
||||
</data>
|
||||
<data name="boobs_cmd" xml:space="preserve">
|
||||
<value>boobs</value>
|
||||
</data>
|
||||
@ -2223,44 +2214,44 @@
|
||||
<data name="listwar_usage" xml:space="preserve">
|
||||
<value>`{0}lw [war_number]` or `{0}lw`</value>
|
||||
</data>
|
||||
<data name="claim_cmd" xml:space="preserve">
|
||||
<value>claim call c</value>
|
||||
<data name="basecall_cmd" xml:space="preserve">
|
||||
<value>basecall</value>
|
||||
</data>
|
||||
<data name="claim_desc" xml:space="preserve">
|
||||
<data name="basecall_desc" xml:space="preserve">
|
||||
<value>Claims a certain base from a certain war. You can supply a name in the third optional argument to claim in someone else's place.</value>
|
||||
</data>
|
||||
<data name="claim_usage" xml:space="preserve">
|
||||
<value>`{0}call [war_number] [base_number] [optional_other_name]`</value>
|
||||
<data name="basecall_usage" xml:space="preserve">
|
||||
<value>`{0}basecall [war_number] [base_number] [optional_other_name]`</value>
|
||||
</data>
|
||||
<data name="claimfinish_cmd" xml:space="preserve">
|
||||
<value>claimfinish cf</value>
|
||||
<data name="callfinish_cmd" xml:space="preserve">
|
||||
<value>callfinish cf</value>
|
||||
</data>
|
||||
<data name="claimfinish_desc" xml:space="preserve">
|
||||
<data name="callfinish_desc" xml:space="preserve">
|
||||
<value>Finish your claim with 3 stars if you destroyed a base. First argument is the war number, optional second argument is a base number if you want to finish for someone else.</value>
|
||||
</data>
|
||||
<data name="claimfinish_usage" xml:space="preserve">
|
||||
<data name="callfinish_usage" xml:space="preserve">
|
||||
<value>`{0}cf 1` or `{0}cf 1 5`</value>
|
||||
</data>
|
||||
<data name="claimfinish2_cmd" xml:space="preserve">
|
||||
<value>claimfinish2 cf2</value>
|
||||
<data name="callfinish2_cmd" xml:space="preserve">
|
||||
<value>callfinish2 cf2</value>
|
||||
</data>
|
||||
<data name="claimfinish2_desc" xml:space="preserve">
|
||||
<data name="callfinish2_desc" xml:space="preserve">
|
||||
<value>Finish your claim with 2 stars if you destroyed a base. First argument is the war number, optional second argument is a base number if you want to finish for someone else.</value>
|
||||
</data>
|
||||
<data name="claimfinish2_usage" xml:space="preserve">
|
||||
<data name="callfinish2_usage" xml:space="preserve">
|
||||
<value>`{0}cf2 1` or `{0}cf2 1 5`</value>
|
||||
</data>
|
||||
<data name="claimfinish1_cmd" xml:space="preserve">
|
||||
<value>claimfinish1 cf1</value>
|
||||
<data name="callfinish1_cmd" xml:space="preserve">
|
||||
<value>callfinish1 cf1</value>
|
||||
</data>
|
||||
<data name="claimfinish1_desc" xml:space="preserve">
|
||||
<data name="callfinish1_desc" xml:space="preserve">
|
||||
<value>Finish your claim with 1 star if you destroyed a base. First argument is the war number, optional second argument is a base number if you want to finish for someone else.</value>
|
||||
</data>
|
||||
<data name="claimfinish1_usage" xml:space="preserve">
|
||||
<data name="callfinish1_usage" xml:space="preserve">
|
||||
<value>`{0}cf1 1` or `{0}cf1 1 5`</value>
|
||||
</data>
|
||||
<data name="unclaim_cmd" xml:space="preserve">
|
||||
<value>unclaim ucall uc</value>
|
||||
<value>uncall</value>
|
||||
</data>
|
||||
<data name="unclaim_desc" xml:space="preserve">
|
||||
<value>Removes your claim from a certain war. Optional second argument denotes a person in whose place to unclaim</value>
|
||||
@ -2335,10 +2326,10 @@
|
||||
<value>Check how much currency a person has. (Defaults to yourself)</value>
|
||||
</data>
|
||||
<data name="cash_usage" xml:space="preserve">
|
||||
<value>`{0}$$` or `{0}$$ @SomeGuy`</value>
|
||||
<value>`{0}$` or `{0}$ @SomeGuy`</value>
|
||||
</data>
|
||||
<data name="cash_cmd" xml:space="preserve">
|
||||
<value>cash $$</value>
|
||||
<value>$ currency $$ $$$ cash cur</value>
|
||||
</data>
|
||||
<data name="listperms_desc" xml:space="preserve">
|
||||
<value>Lists whole permission chain with their indexes. You can specify an optional page number if there are a lot of permissions.</value>
|
||||
@ -2403,14 +2394,14 @@
|
||||
<data name="showemojis_usage" xml:space="preserve">
|
||||
<value>`{0}se A message full of SPECIAL emojis`</value>
|
||||
</data>
|
||||
<data name="shuffledeck_cmd" xml:space="preserve">
|
||||
<value>shuffle sh</value>
|
||||
<data name="deckshuffle_cmd" xml:space="preserve">
|
||||
<value>deckshuffle dsh</value>
|
||||
</data>
|
||||
<data name="shuffledeck_desc" xml:space="preserve">
|
||||
<data name="deckshuffle_desc" xml:space="preserve">
|
||||
<value>Reshuffles all cards back into the deck.</value>
|
||||
</data>
|
||||
<data name="shuffledeck_usage" xml:space="preserve">
|
||||
<value>`{0}sh`</value>
|
||||
<data name="deckshuffle_usage" xml:space="preserve">
|
||||
<value>`{0}dsh`</value>
|
||||
</data>
|
||||
<data name="forwardmessages_cmd" xml:space="preserve">
|
||||
<value>fwmsgs</value>
|
||||
|
@ -18,6 +18,12 @@ namespace NadekoBot.Extensions
|
||||
{
|
||||
public static class Extensions
|
||||
{
|
||||
public static void ThrowIfNull<T>(this T obj, string name) where T : class
|
||||
{
|
||||
if (obj == null)
|
||||
throw new ArgumentNullException(nameof(name));
|
||||
}
|
||||
|
||||
public static ConcurrentDictionary<TKey, TValue> ToConcurrent<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> dict)
|
||||
=> new ConcurrentDictionary<TKey, TValue>(dict);
|
||||
|
||||
|
15
src/NadekoBot/_Extensions/IEnumerableExtensions.cs
Normal file
15
src/NadekoBot/_Extensions/IEnumerableExtensions.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NadekoBot.Extensions
|
||||
{
|
||||
public static class IEnumerableExtensions
|
||||
{
|
||||
public static IEnumerable<T> Distinct<T, U>(this IEnumerable<T> data, Func<T, U> getKey) =>
|
||||
data.GroupBy(x => getKey(x))
|
||||
.Select(x => x.First());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user