{"id":22521074,"url":"https://github.com/instafluff/comfydiscord","last_synced_at":"2026-03-06T09:06:01.880Z","repository":{"id":50058014,"uuid":"200270902","full_name":"instafluff/ComfyDiscord","owner":"instafluff","description":"Comfiest Discord Bot Module for Coding Cafe","archived":false,"fork":false,"pushed_at":"2024-06-18T19:20:23.000Z","size":41,"stargazers_count":5,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-18T19:19:25.216Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/instafluff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-02T17:07:20.000Z","updated_at":"2022-08-10T21:04:14.000Z","dependencies_parsed_at":"2022-08-20T10:30:51.002Z","dependency_job_id":null,"html_url":"https://github.com/instafluff/ComfyDiscord","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instafluff%2FComfyDiscord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instafluff%2FComfyDiscord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instafluff%2FComfyDiscord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instafluff%2FComfyDiscord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/instafluff","download_url":"https://codeload.github.com/instafluff/ComfyDiscord/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228562265,"owners_count":17937234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-07T05:09:34.180Z","updated_at":"2026-03-06T09:06:01.802Z","avatar_url":"https://github.com/instafluff.png","language":"JavaScript","funding_links":["https://github.com/sponsors/instafluff"],"categories":[],"sub_categories":[],"readme":"# ComfyDiscord\nWe built this Comfy Discord Bot Module live on Twitch for Coding Cafe!\n\n**ComfyDiscord** lets you create a bot for your Discord server ***SUPER EASILY*** in just a few lines of code.\n\n## Instafluff ##\n\u003e *Like these projects? The best way to support my open-source projects is by becoming a Comfy Sponsor on GitHub!*\n\n\u003e https://github.com/sponsors/instafluff\n\n\u003e *Come and hang out with us at the Comfiest Corner on Twitch!*\n\n\u003e https://twitch.tv/instafluff\n\n## Instructions ##\n\n#### Node\n1. Install `comfydiscord`\n```\nnpm install comfydiscord --save\n```\n\n2. Respond to !commands in your Discord\n```javascript\nrequire( \"dotenv\" ).config();\n\nconst ComfyDiscord = require( \"comfydiscord\" );\nComfyDiscord.onCommand = ( channel, user, command, message, flags ) =\u003e {\n  if( command == \"test\" ) {\n    console.log( \"!test was typed in chat\" );\n  }\n}\nComfyDiscord.Init( \"MyDiscordBotToken\" );\n```\n\n## Flags ##\n\nCurrently, the flags possible in `onCommand()` are:\n\n- bot\n\n## Reading Chat Messages ##\n\nYou can read chat messages by using the `onChat()` handler\n\n```javascript\nComfyDiscord.onChat = ( channel, user, message, flags, extra ) =\u003e {\n  console.log( channel, user, message );\n}\n```\n\n## Sending Chat Messages ##\n\nSending Chat Messages can be done through `ComfyDiscord.Say( channel, message )`.\n\n#### Securely adding your Discord token\n1. Register a Discord App, Navigate to `Bot` in the Settings Menu on the page, and Get a Discord Bot Token - [https://discordapp.com/developers/applications/](https://discordapp.com/developers/applications/)\nand Invite the Bot into your server using a link with your Bot's Client ID and permission scope [https://discordapp.com/oauth2/authorize?client_id=123mybotclientid123\u0026scope=bot\u0026permissions=133262656](https://discordapp.com/oauth2/authorize?client_id=123mybotclientid123\u0026scope=bot\u0026permissions=133262656)\n2. Install `dotenv`\n```\nnpm install dotenv --save\n```\n3. Create a file named `.env` that looks like this:\n```javascript\nDISCORDTOKEN=[DISCORD-BOT-TOKEN HERE] # e.g. DISCORDTOKEN=Fdkjher128764Da3B\n```\n4. Initialize with the Token\n```javascript\nrequire( \"dotenv\" ).config();\n\nconst ComfyDiscord = require( \"comfydiscord\" );\nComfyDiscord.onCommand = ( channel, user, command, message, flags ) =\u003e {\n  if( command == \"test\" ) {\n    ComfyDiscord.Say( \"general\", \"replying to !test\" );\n  }\n}\nComfyDiscord.Init( process.env.DISCORDTOKEN );\n```\n\n## All Supported Events ##\n\n- **onCommand**`( channel, user, command, message, flags, extra )`\n\n  Responds to \"!\" commands\n\n  - **`channel`** (_string_) - Name of the Discord channel.\n  - **`user`** (_string_) - Name of the message author.\n  - **`command`** (_string_) - Name of the command used. The \"!\" is removed\n  and is lower case.\n  - **`message`** (_string_) - The message without the command.\n  - **`flags`** (_MessageFlags_) - Basic flags about the user.\n  - **`extra`** (_MessageExtras_) - Extra details from the message.\n\n- **onChat**`( channel, user, message, flags, extra )`\n\n  Responds to user chatting\n\n  - **`channel`** (_string_) - Name of the Discord channel.\n  - **`user`** (_string_) - Name of the message author.\n  - **`message`** (_string_) - The message.\n  - **`flags`** (_MessageFlags_) - Basic flags about the user.\n  - **`extra`** (_MessageExtras_) - Extra details from the message.\n\n### Types ###\n\n- **`MessageFlags`** (_object_)\n\n  Basic flags about the user.\n\n  - **`bot`** (_boolean_) If the user is a bot account.\n\n- **`MessageExtras`** (_object_)\n\n  Extra details from the message.\n\n  - **`id`** (_string_) - The message ID.\n  - **`channelId`** (_string_) - The channel ID.\n  - **`channel`** (_TextChannel | DMChannel | GroupDMChannel_) - Discord.js\n  Channel.\n  - **`userId`** (_string_) - Message author's ID.\n  - **`username`** (_string_) - Message author's username.\n  - **`userNumber`** (_string_) - Message author's username discriminator.\n  - **`nickname`** (_string_) - Message author's nickname within the guild.\n  - **`displayName`** (_string_) - Nickname or username with discriminator.\n  - **`cleanContent`** (_string_) - The message contents with all mentions\n  replaced by the equivalent text.\n\n## Credits ##\nThank you too all the participants of this project!\n\n**Gilokk0, ItsLittany, Instafluff, Instafriend, ChatTranslator, BillNash, MacabreMan, MsSaltyGiggles, That_MS_Gamer, DutchGamer46, sethorizer, TastyZero, jackconceprio, Amarogine, xRolo768, simrose4u, FlavCreations, i_am_from_mars, PhysoTronic, IAmThatOneJason, twallace123, superman1990skid, LilyHazel, Stay_Hydrated_Bot, atel0s, Docpinecone, Copperbeardy, losthewar, wietlol, caLLowCreation, JMSWRNR, BungalowGlow, theArtifacts, SausageCam, crazychick2019, morepizza308, TheHungerService, rockysenpai24, BellaTriXrbsa, where_is_laughingman, LatJorr, seniorkae, ReadyPlayerEmma, smilesandtea, merkurrz, CJnxd, primal_vertex, QuiiZyy, lewdmelon, MalForTheWin, itsboek, twitch_chat_is_stupid, iMrTnT, angel0O, ripSquidd, napkats, boki996, Clarkio, drowmander, JUBAN_3, Kyoslilmonster, ElysiaGriffin, tvgBadger, DareFutari, HonestDanGames, Dragonflytru_1, imJMB, rurutu, kazuhiko0, ichibadass, DurandalCraft, codeheir, shinageeexpress, JesusAcHe**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstafluff%2Fcomfydiscord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finstafluff%2Fcomfydiscord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstafluff%2Fcomfydiscord/lists"}