Fix occasional 'unknown error' in override command

This commit is contained in:
Noi 2020-04-02 11:35:23 -07:00
parent 5012834073
commit 80eb23c951
2 changed files with 5 additions and 1 deletions

View file

@ -4,7 +4,7 @@
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<RootNamespace>BirthdayBot</RootNamespace> <RootNamespace>BirthdayBot</RootNamespace>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework>
<Version>1.4.0</Version> <Version>1.4.1</Version>
<Authors>Noi</Authors> <Authors>Noi</Authors>
<Company /> <Company />
<Description>Discord bot for birthday reminders.</Description> <Description>Discord bot for birthday reminders.</Description>

View file

@ -319,6 +319,10 @@ Friend Class ManagerCommands
Return Return
End If End If
Dim overuser = reqChannel.Guild.GetUser(user) Dim overuser = reqChannel.Guild.GetUser(user)
If overuser Is Nothing Then
Await reqChannel.SendMessageAsync(BadUserError)
Return
End If
' Third parameter: determine command to invoke. ' Third parameter: determine command to invoke.
' Reminder that we're only receiving a param array of size 3 at maximum. String must be split again. ' Reminder that we're only receiving a param array of size 3 at maximum. String must be split again.