]> gitweb.factorcode.org Git - factor.git/commit
discord: add basic discord bot support
authorDoug Coleman <doug.coleman@gmail.com>
Tue, 28 Mar 2023 04:06:25 +0000 (23:06 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Tue, 28 Mar 2023 04:32:17 +0000 (23:32 -0500)
commit7829620f6c6da9785ec0ac561f0578aa838e2e6c
treecaa6ecdfc63f3cda4e3af68db436edf3f38ef78e
parent9029ceaea76c0e7fd7ba9a04a301409e25052153
discord: add basic discord bot support

- go to discord developer portal https://discord.com/developers/applications
- make a discord application
- add a bot to that app
-- enable PRESENCE INTENT, SERVER MEMBERS INTENT, MESSAGE CONTENT INTENT (as desired)

! For websockets
t{ discord-bot-config
    { token "...from discord developer portal..." }
    { application-id "10885523740" } ! from developer portal
    { guild-id "1357300335" }        ! from "developer mode" in discord client, right click the server and "copy id"
    { channel-id "1089175837623" }   ! from "developer mode", right click channel and "copy id"
    { permissions 2048 }             ! intentions (2048 is send messages)
}
discord-connect

! For REST api
T{ discord-bot-config
    { client-id "bot id from dev portal" }
    { client-secret "from dev portal" }
}
basis/http/websockets/authors.txt [new file with mode: 0644]
basis/http/websockets/websockets.factor [new file with mode: 0644]
extra/discord/authors.txt [new file with mode: 0644]
extra/discord/discord.factor [new file with mode: 0644]