Ignore bot input
This commit is contained in:
parent
e6fab52e45
commit
c8b1ed31bf
2 changed files with 4 additions and 2 deletions
|
@ -5,7 +5,6 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Noikoio.RegexBot.Module.ModTools
|
namespace Noikoio.RegexBot.Module.ModTools
|
||||||
|
@ -26,6 +25,9 @@ namespace Noikoio.RegexBot.Module.ModTools
|
||||||
|
|
||||||
private async Task Client_MessageReceived(SocketMessage arg)
|
private async Task Client_MessageReceived(SocketMessage arg)
|
||||||
{
|
{
|
||||||
|
// Ignore bots
|
||||||
|
if (arg.Author.IsBot) return;
|
||||||
|
|
||||||
// Disregard if not in a guild
|
// Disregard if not in a guild
|
||||||
SocketGuild g = (arg.Author as SocketGuildUser)?.Guild;
|
SocketGuild g = (arg.Author as SocketGuildUser)?.Guild;
|
||||||
if (g == null) return;
|
if (g == null) return;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<RootNamespace>Noikoio.RegexBot</RootNamespace>
|
<RootNamespace>Noikoio.RegexBot</RootNamespace>
|
||||||
<AssemblyVersion>2.3.3.0</AssemblyVersion>
|
<AssemblyVersion>2.3.4.0</AssemblyVersion>
|
||||||
<Description>Highly configurable Discord moderation bot</Description>
|
<Description>Highly configurable Discord moderation bot</Description>
|
||||||
<Authors>Noikoio</Authors>
|
<Authors>Noikoio</Authors>
|
||||||
<Company />
|
<Company />
|
||||||
|
|
Loading…
Reference in a new issue