Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
Bugfix due to wrong documentation of Discordia
  • Loading branch information
ApertureDevelopment authored Oct 22, 2018
1 parent 6bdb84c commit ac7dfbf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions antispam.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ function banMember(member)
}})
owner["mention"] = member.guild.owner.user.mentionString
owner["tag"] = member.guild.owner.user.tag
elseif member.guild:get(member.guild.ownerId) then
member.guild:get(member.guild.ownerId).user:send({
elseif member.guild and member.guild.ownerId then
member.guild:getMember(member.guild.ownerId).user:send({
embed = {
title = "A user got banned by me",
description = [[I have banned a user for looking like a SelfBot.]],
Expand All @@ -72,8 +72,8 @@ function banMember(member)
},
color = 0xFF0000 -- hex color code
}})
owner["mention"] = member.guild:get(member.guild.ownerId).user.mentionString
owner["tag"] = member.guild:get(member.guild.ownerId).user.tag
owner["mention"] = member.guild:getMember(member.guild.ownerId).user.mentionString
owner["tag"] = member.guild:getMember(member.guild.ownerId).user.tag
else
print("Could not contact owner of: "..member.guild.name.." - Error 404")
end
Expand Down

0 comments on commit ac7dfbf

Please sign in to comment.