When I typed the !차단 command in Discord, the bot sends the same message twice.
I wonder why the bot sends messages twice instead of once
What should I do?
I wonder why the bot sends messages twice instead of once
What should I do?
Code:
discord command !차단 [<text>] [<text>]:
executable in: guild
roles: 총 책임자, 서버_관리팀, 서버호스팅
trigger:
discord id of event-channel is "811096023942037525"
if arg 1 is not set:
send "사용법: !차단 <디스코드 유저 ID> 또는 !차단 <디스코드 유저 ID> [해제]" to event-channel with event-bot
stop
if arg 1 parsed as integer is not integer:
send "디스코드 유저 ID를 입력해주세요! (디스코드 유저 ID를 보는 방법은 으로 !도움말 을 치시면 나옵니다!)" to event-channel with event-bot
stop
else if arg 2 is not set:
if {차단유저::%arg 1%} is true:
send "<@%arg 1%>님은 이미 차단되어 있습니다!" to event-channel with event-bot
else:
loop {인증유저id::*}:
if loop-value = arg 1:
delete {인증유저id::%loop-index%}
delete {인증유저::%loop-index%}
set {차단유저::%arg 1%} to true
send "<@%arg 1%>님을 차단하셨습니다." to event-channel with event-bot
stop
send "<@%arg 1%> 이 유저는 존재하지 않습니다!" to event-channel with event-bot
else if arg 2 is "해제":
if {차단유저::%arg 1%} is not set:
send "<@%arg 1%>님은 이미 차단되어 있지 않습니다!" to event-channel with event-bot
else:
delete {차단유저::%arg 1%}
send "<@%arg 1%>님을 차단 해제하셨습니다." to event-channel with event-bot