mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-21 21:54:36 +00:00
Updated to version 0.5.2
-Fixed issue in which role pings were not recognized -Added console output of incoming commands for research purposes -This information will assist in finding common incorrect usage -It will be removed later
This commit is contained in:
parent
76c94c8d59
commit
fae8da5511
3 changed files with 10 additions and 5 deletions
|
@ -131,6 +131,7 @@ Class BirthdayBot
|
|||
' Don't let this prevent the bot from continuing command execution.
|
||||
End Try
|
||||
End If
|
||||
Log("Command", $"{channel.Guild.Name}/{author.Username}#{author.Discriminator}: {msg.Content}")
|
||||
Await command(csplit, channel, author)
|
||||
Catch ex As Exception
|
||||
If TypeOf ex Is HttpException Then Return
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>BirthdayBot</RootNamespace>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<Version>0.5.1</Version>
|
||||
<AssemblyVersion>0.5.1.0</AssemblyVersion>
|
||||
<Version>0.5.2</Version>
|
||||
<AssemblyVersion>0.5.2.0</AssemblyVersion>
|
||||
<Authors>Noikoio</Authors>
|
||||
<Company />
|
||||
<Description>Discord bot for birthday reminders.</Description>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Imports Discord.WebSocket
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports Discord.WebSocket
|
||||
|
||||
Friend Class ManagerCommands
|
||||
Inherits CommandsCommon
|
||||
|
@ -58,6 +59,8 @@ Friend Class ManagerCommands
|
|||
End Function
|
||||
|
||||
#Region "Configuration sub-commands"
|
||||
Private Shared ReadOnly RoleMention As New Regex("<@?&(?<snowflake>\d+)>", RegexOptions.Compiled)
|
||||
|
||||
' Birthday role set
|
||||
Private Async Function ScmdRole(param As String(), reqChannel As SocketTextChannel) As Task
|
||||
If param.Length <> 2 Then
|
||||
|
@ -70,8 +73,9 @@ Friend Class ManagerCommands
|
|||
Dim role As SocketRole = Nothing
|
||||
|
||||
' Resembles a role mention? Strip it to the pure number
|
||||
If input.StartsWith("<&") And input.EndsWith(">") Then
|
||||
input = input.Substring(2, input.Length - 3)
|
||||
Dim rmatch = RoleMention.Match(input)
|
||||
If rmatch.Success Then
|
||||
input = rmatch.Groups("snowflake").Value
|
||||
End If
|
||||
|
||||
' Attempt to get role by ID
|
||||
|
|
Loading…
Reference in a new issue