본문 바로가기

discord

(4)
디스코드 채팅시 유용한 마크다운 모음 ```fix #-------------------------------------> DISCORD TEXT FORMATTING alt + 7 for me) ``` ___***code block formating:***___ ```md (3 backticks)markdown or just: (3 backticks)md #lines starting with # are blue(?), [murky blue][red?] --------------------> anywhere in the code block [murky blue](red?) --------------------> anywhere in the code block -> anywhere in the code block (3 backticks) ``` ..
디스코드 봇 특정 메시지에 특정 반응을 추가 선택시 역할 부여 // !경고! // 본 코드는 최적화가 안된 // 단순 기능 구현 코드입니다. // 최적화는 스스로! var Discord = require('discord.js'); var bot = new Discord.Client(); const events = { MESSAGE_REACTION_ADD: 'messageReactionAdd', MESSAGE_REACTION_REMOVE: 'messageReactionRemove', }; bot.on('ready', () => { console.log('Test bot Ready...'); }); bot.on('message', message =>{ const sender = message.author; const msg = message.content.toLower..
디스코드 봇 기본 뼈대 Node.js 소스 코드 var Discord = require('discord.js');var bot = new Discord.Client(); bot.on('message', message => { var sender = message.author; var msg = message.content.toUpperCase(); var prefix = '>'; if(msg === prefix + 'hello'){ message.channel.send('world!'); }}); bot.login('Your BOT Token HERE');
디스코드 봇 리액션 달면 채널 보이거나 숨기기 원리 1. 먼저 A란 역할을 생성한다. 2. 그렇게 생성한 역할을 채널에 설정한다. 3. 메시지에 리액션을 달면 생성한 역할을 부여한다. 4. 리액션을 제거하면 역할을 회수한다. 이제 직접 코딩하여 기능을 구현하여 보자. 기능 구현 완료! 구현 완료한 소스코드 확인하기 http://pilgoo.tistory.com/343