diff --git a/Cliptok.csproj b/Cliptok.csproj index 96a0c0fa..1722d613 100644 --- a/Cliptok.csproj +++ b/Cliptok.csproj @@ -13,21 +13,21 @@ <ItemGroup> <PackageReference Include="Abyssal.HumanDateParser" Version="2.0.0-20191113.1" /> - <PackageReference Include="DSharpPlus" Version="5.0.0-nightly-02426" /> - <PackageReference Include="DSharpPlus.Commands" Version="5.0.0-nightly-02426" /> + <PackageReference Include="DSharpPlus" Version="5.0.0-nightly-02430" /> + <PackageReference Include="DSharpPlus.Commands" Version="5.0.0-nightly-02430" /> <PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" /> <PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.0" /> <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" /> <PackageReference Include="Microsoft.Extensions.Options" Version="9.0.0" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> - <PackageReference Include="Serilog" Version="4.1.0" /> + <PackageReference Include="Serilog" Version="4.2.0" /> <PackageReference Include="Serilog.Expressions" Version="5.0.0" /> - <PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" /> + <PackageReference Include="Serilog.Extensions.Logging" Version="9.0.0" /> <PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" /> <PackageReference Include="Serilog.Sinks.Grafana.Loki" Version="8.3.0" /> <PackageReference Include="Serilog.Sinks.TextWriter" Version="3.0.0" /> - <PackageReference Include="StackExchange.Redis" Version="2.8.16" /> + <PackageReference Include="StackExchange.Redis" Version="2.8.22" /> <PackageReference Include="System.Linq" Version="4.3.0" /> <PackageReference Include="System.Linq.Async" Version="6.0.1" /> </ItemGroup> diff --git a/Commands/DebugCmds.cs b/Commands/DebugCmds.cs index e2c52a4b..10addac6 100644 --- a/Commands/DebugCmds.cs +++ b/Commands/DebugCmds.cs @@ -625,83 +625,6 @@ public async Task SearchMembersCmd(TextCommandContext ctx, string regex) await ctx.Channel.SendMessageAsync(await StringHelpers.CodeOrHasteBinAsync(JsonConvert.SerializeObject(memberIdsTonames, Formatting.Indented), "json")); } - [Command("rawmessage")] - [Description("Dumps the raw data for a message.")] - [TextAlias("rawmsg")] - [IsBotOwner] - public async Task DumpRawMessage(TextCommandContext ctx, [Description("The message whose raw data to get.")] string msgLinkOrId) - { - DiscordMessage message; - if (Constants.RegexConstants.discord_link_rx.IsMatch(msgLinkOrId)) - { - // Assume the user provided a message link. Extract channel and message IDs to get message content. - - // Pattern to extract channel and message IDs from URL - var idPattern = new Regex(@"(?:.*\/)([0-9]+)\/([0-9]+)$"); - - // Get channel ID - var targetChannelId = Convert.ToUInt64(idPattern.Match(msgLinkOrId).Groups[1].ToString().Replace("/", "")); - - // Try to fetch channel - DiscordChannel channel; - try - { - channel = await ctx.Client.GetChannelAsync(targetChannelId); - } - catch - { - await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} I couldn't fetch the channel from your message link! Please try again."); - return; - } - - // Get message ID - var targetMessage = Convert.ToUInt64(idPattern.Match(msgLinkOrId).Groups[2].ToString().Replace("/", "")); - - // Try to fetch message - try - { - message = await channel.GetMessageAsync(targetMessage); - } - catch - { - await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} I couldn't fetch the message from your message link! Please try again."); - return; - } - } - else - { - if (msgLinkOrId.Length < 17) - { - await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} That doesn't look right. Try again."); - return; - } - - ulong messageId; - try - { - messageId = Convert.ToUInt64(msgLinkOrId); - } - catch - { - await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} That doesn't look like a valid message ID. Try again."); - return; - } - - try - { - message = await ctx.Channel.GetMessageAsync(messageId); - } - catch - { - await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} I wasn't able to read that message! Please try again."); - return; - } - } - - var rawMsgData = JsonConvert.SerializeObject(message, Formatting.Indented); - await ctx.RespondAsync(await StringHelpers.CodeOrHasteBinAsync(rawMsgData, "json")); - } - private static async Task<(bool success, ulong failedOverwrite)> ImportOverridesFromChannelAsync(DiscordChannel channel) { // Imports overrides from the specified channel to the database. See 'debug overrides import' and 'debug overrides importall' diff --git a/Commands/UtilityCmds.cs b/Commands/UtilityCmds.cs index 55d1ef8d..c6f54f16 100644 --- a/Commands/UtilityCmds.cs +++ b/Commands/UtilityCmds.cs @@ -2,6 +2,15 @@ namespace Cliptok.Commands { public class UtilityCmds { + [Command("Dump message data")] + [SlashCommandTypes(DiscordApplicationCommandType.MessageContextMenu)] + [AllowedProcessors(typeof(MessageCommandProcessor))] + public async Task DumpMessage(MessageCommandContext ctx, DiscordMessage targetMessage) + { + var rawMsgData = JsonConvert.SerializeObject(targetMessage, Formatting.Indented); + await ctx.RespondAsync(await StringHelpers.CodeOrHasteBinAsync(rawMsgData, "json"), ephemeral: true); + } + [Command("Show Avatar")] [SlashCommandTypes(DiscordApplicationCommandType.UserContextMenu)] [AllowedProcessors(typeof(UserCommandProcessor))] diff --git a/GlobalUsings.cs b/GlobalUsings.cs index e936a843..16e89996 100644 --- a/GlobalUsings.cs +++ b/GlobalUsings.cs @@ -8,6 +8,7 @@ global using DSharpPlus.Commands.ContextChecks; global using DSharpPlus.Commands.EventArgs; global using DSharpPlus.Commands.Exceptions; +global using DSharpPlus.Commands.Processors.MessageCommands; global using DSharpPlus.Commands.Processors.SlashCommands; global using DSharpPlus.Commands.Processors.SlashCommands.ArgumentModifiers; global using DSharpPlus.Commands.Processors.TextCommands; diff --git a/Lists/scams.txt b/Lists/scams.txt index 8447d7f2..9a38454a 100644 --- a/Lists/scams.txt +++ b/Lists/scams.txt @@ -419,7 +419,8 @@ in just 72 hours without no doubts from the crypto market you will have to pay me my commission! Once you receive your profit! jennyRol221 3729830 -I'll teach 10 people to earn $30K within a week. But you’ll pay me 10% of your profits when you receive it. Drop a message let's get started by asking (HOW) via +I'll teach 10 people to earn $30K within a week +But you’ll pay me 10% of your profits when you receive it WhatsApp: +1 (862) 707‑4856 Official_Mark0 if anyone that’s new to trading and needs help learning @@ -539,3 +540,7 @@ interested on how to start earning $100k Free deposit 100$ Promocode:Open2024 gambler.icu +serious about earning over $50K weekly in the digital market +% of your profits once you start seeing earnings +get started by asking (How) +coach_davidrobert