Skip to content

Commit

Permalink
Attempt 2; actually fixed it.
Browse files Browse the repository at this point in the history
  • Loading branch information
VelvetToroyashi committed Jan 21, 2021
1 parent 7da7113 commit b435fe5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Silk.Core/Tools/EventHelpers/MessageAddedHandler.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using DSharpPlus;
using DSharpPlus.CommandsNext;
Expand All @@ -24,10 +23,9 @@ public MessageAddedHandler(TicketService ticketService, PrefixCacheService prefi
_prefixCache = prefixCache;
_logger = logger;
}

public Task Tickets(DiscordClient c, MessageCreateEventArgs e)
{

_ = Task.Run(async () =>
{
if (!await _ticketService.HasTicket(e.Channel, e.Author.Id)) return;
Expand Down Expand Up @@ -72,7 +70,7 @@ public Task Commands(DiscordClient c, MessageCreateEventArgs e)

if (prefixLength is -1) return;

string commandString = e.Message.Content[prefixLength..^1];
string commandString = e.Message.Content.Substring(prefixLength);

Command? command = cnext.FindCommand(commandString, out string arguments);

Expand Down

0 comments on commit b435fe5

Please sign in to comment.