mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	Merge branch 'v3' of https://gitlab.com/kwoth/nadekobot into v3
This commit is contained in:
		@@ -265,7 +265,15 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            if (amount <= 0)
 | 
			
		||||
                return;
 | 
			
		||||
 | 
			
		||||
            await _cs.AddAsync(usrId,
 | 
			
		||||
            var usr = await ((DiscordSocketClient)Context.Client).Rest.GetUserAsync(usrId);
 | 
			
		||||
 | 
			
		||||
            if(usr is null)
 | 
			
		||||
            {
 | 
			
		||||
                await ReplyErrorLocalizedAsync(strs.user_not_found).ConfigureAwait(false);
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            await _cs.AddAsync(usr,
 | 
			
		||||
                $"Awarded by bot owner. ({ctx.User.Username}/{ctx.User.Id}) {(msg ?? "")}",
 | 
			
		||||
                amount,
 | 
			
		||||
                gamble: (ctx.Client.CurrentUser.Id != usrId)).ConfigureAwait(false);
 | 
			
		||||
@@ -275,7 +283,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        [Priority(2)]
 | 
			
		||||
        [Priority(3)]
 | 
			
		||||
        public async Task Award(long amount, [Leftover] IRole role)
 | 
			
		||||
        {
 | 
			
		||||
            var users = (await ctx.Guild.GetUsersAsync().ConfigureAwait(false))
 | 
			
		||||
 
 | 
			
		||||
@@ -763,7 +763,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         [RequireUserPermission(GuildPermission.Administrator)]
 | 
			
		||||
         [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
         public async Task MusicQuality()
 | 
			
		||||
         {
 | 
			
		||||
             var quality = await _service.GetMusicQualityAsync(ctx.Guild.Id);
 | 
			
		||||
@@ -772,7 +772,7 @@ namespace NadekoBot.Modules.Music
 | 
			
		||||
         
 | 
			
		||||
         [NadekoCommand, Aliases]
 | 
			
		||||
         [RequireContext(ContextType.Guild)]
 | 
			
		||||
         [RequireUserPermission(GuildPermission.Administrator)]
 | 
			
		||||
         [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
         public async Task MusicQuality(QualityPreset preset)
 | 
			
		||||
         {
 | 
			
		||||
             await _service.SetMusicQualityAsync(ctx.Guild.Id, preset);
 | 
			
		||||
 
 | 
			
		||||
@@ -208,7 +208,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            public async Task QuoteDelete(int id)
 | 
			
		||||
            {
 | 
			
		||||
                var isAdmin = ((IGuildUser)ctx.Message.Author).GuildPermissions.ManageMessages;
 | 
			
		||||
                var hasManageMessages = ((IGuildUser)ctx.Message.Author).GuildPermissions.ManageMessages;
 | 
			
		||||
 | 
			
		||||
                var success = false;
 | 
			
		||||
                string response;
 | 
			
		||||
@@ -216,7 +216,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                {
 | 
			
		||||
                    var q = uow.Quotes.GetById(id);
 | 
			
		||||
 | 
			
		||||
                    if ((q?.GuildId != ctx.Guild.Id) || (!isAdmin && q.AuthorId != ctx.Message.Author.Id))
 | 
			
		||||
                    if ((q?.GuildId != ctx.Guild.Id) || (!hasManageMessages && q.AuthorId != ctx.Message.Author.Id))
 | 
			
		||||
                    {
 | 
			
		||||
                        response = GetText(strs.quotes_remove_none);
 | 
			
		||||
                    }
 | 
			
		||||
@@ -288,7 +288,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
            
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [RequireUserPermission(GuildPermission.Administrator)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            public async Task QuotesExport()
 | 
			
		||||
            {
 | 
			
		||||
                IEnumerable<Quote> quotes;
 | 
			
		||||
@@ -313,7 +313,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [RequireUserPermission(GuildPermission.Administrator)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [Ratelimit(300)]
 | 
			
		||||
#if GLOBAL_NADEKO
 | 
			
		||||
            [OwnerOnly]
 | 
			
		||||
 
 | 
			
		||||
@@ -90,7 +90,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [RequireUserPermission(GuildPermission.Administrator)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public Task RemindList(Server _, int page = 1)
 | 
			
		||||
                => RemindList(page, true);
 | 
			
		||||
@@ -151,7 +151,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
 | 
			
		||||
            [NadekoCommand, Aliases]
 | 
			
		||||
            [RequireContext(ContextType.Guild)]
 | 
			
		||||
            [RequireUserPermission(GuildPermission.Administrator)]
 | 
			
		||||
            [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
            [Priority(0)]
 | 
			
		||||
            public Task RemindDelete(Server _, int index)
 | 
			
		||||
                => RemindDelete(index, true);
 | 
			
		||||
 
 | 
			
		||||
@@ -284,24 +284,24 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [RequireBotPermission(GuildPermission.ManageEmojis)]
 | 
			
		||||
        [RequireUserPermission(GuildPermission.ManageEmojis)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageEmojis)]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageEmojis)]
 | 
			
		||||
        [Priority(2)]
 | 
			
		||||
        public Task EmojiAdd(string name, Emote emote)
 | 
			
		||||
            => EmojiAdd(name, emote.Url);
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [RequireBotPermission(GuildPermission.ManageEmojis)]
 | 
			
		||||
        [RequireUserPermission(GuildPermission.ManageEmojis)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageEmojis)]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageEmojis)]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public Task EmojiAdd(Emote emote)
 | 
			
		||||
            => EmojiAdd(emote.Name, emote.Url);
 | 
			
		||||
        
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [RequireBotPermission(GuildPermission.ManageEmojis)]
 | 
			
		||||
        [RequireUserPermission(GuildPermission.ManageEmojis)]
 | 
			
		||||
        [BotPerm(GuildPerm.ManageEmojis)]
 | 
			
		||||
        [UserPerm(GuildPerm.ManageEmojis)]
 | 
			
		||||
        [Priority(0)]
 | 
			
		||||
        public async Task EmojiAdd(string name, string url = null)
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,7 @@ namespace NadekoBot.Modules.Xp
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        [RequireUserPermission(GuildPermission.Administrator)]
 | 
			
		||||
        [UserPerm(GuildPerm.Administrator)]
 | 
			
		||||
        public async Task XpRewsReset()
 | 
			
		||||
        {
 | 
			
		||||
            var reply = await PromptUserConfirmAsync(_eb.Create()
 | 
			
		||||
 
 | 
			
		||||
@@ -611,7 +611,7 @@ quoteid:
 | 
			
		||||
  args:
 | 
			
		||||
    - "123456"
 | 
			
		||||
quotedelete:
 | 
			
		||||
  desc: "Deletes a quote with the specified ID. You have to be either server Administrator or the creator of the quote to delete it."
 | 
			
		||||
  desc: "Deletes a quote with the specified ID. You have to either have the Manage Messages permission or be the creator of the quote to delete it."
 | 
			
		||||
  args:
 | 
			
		||||
    - "123456"
 | 
			
		||||
draw:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user