{"id":23554125,"url":"https://github.com/SkyeActsOut/tootcord","last_synced_at":"2025-08-29T09:31:49.323Z","repository":{"id":63639190,"uuid":"569467752","full_name":"SkyeActsOut/tootcord","owner":"SkyeActsOut","description":"Post to Mastodon using Discord bots","archived":false,"fork":false,"pushed_at":"2022-11-24T17:19:58.000Z","size":33,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-30T08:20:56.788Z","etag":null,"topics":["discord","discordjs","mastodon","mastodon-api","mastodon-client"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SkyeActsOut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-22T22:28:43.000Z","updated_at":"2024-05-31T02:17:33.000Z","dependencies_parsed_at":"2023-01-23T17:01:21.647Z","dependency_job_id":null,"html_url":"https://github.com/SkyeActsOut/tootcord","commit_stats":null,"previous_names":["skymocha/tootcord"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkyeActsOut%2Ftootcord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkyeActsOut%2Ftootcord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkyeActsOut%2Ftootcord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkyeActsOut%2Ftootcord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SkyeActsOut","download_url":"https://codeload.github.com/SkyeActsOut/tootcord/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231352266,"owners_count":18363523,"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":["discord","discordjs","mastodon","mastodon-api","mastodon-client"],"created_at":"2024-12-26T12:11:58.214Z","updated_at":"2024-12-26T12:11:59.280Z","avatar_url":"https://github.com/SkyeActsOut.png","language":"TypeScript","funding_links":["https://www.patreon.com/skymocha)!"],"categories":[],"sub_categories":[],"readme":"# Tootcord\n\nA simple library for posting toots to one or multiple Mastodon server within a Discord.JS bot. \n\n## Documentation\n\nThe primary command is `post_toot` under the `Tootcord` class.\n\n```ts\nasync function post_toot(text: string, files: Collection\u003cSnowflake, MessageAttachment\u003e): Promise\u003cboolean\u003e;\n```\n\nAn example can be found in `example.ts`, otherwise, the following is a shorthand example:\n\n```ts\nimport { Tootcord } from 'tootcord';\n\nlet mast_instance = new Tootcord ('m.skymocha.net', 'access_token');\n\n// Discord client.on for message\nclient.on ('message', async (message: Message) =\u003e {\n\n    if (message.content.startsWith('!mastworld')) \n        mast_instance.post_toot ('Hello World!', message.attachments).\n\n}\n\n```\n\nSince `post_toot` returns a `boolean` as `true` when sent successfully, otherwise `post_toot` returns `false`.\n\nCurrently `post_toot` returns `false` if the text is over 500 characters, you can implement length and error checking by doing the following:\n\n```ts\n// OPTION ONE\nlet toot: boolean = await masto.post_toot('Hello World!', message.attachments)\n\nif (toot) {\n    message.reply('toot sent successfully!')\n}\nelse {\n    message.reply('toot could not be sent (longer than 500 characters? unknown erorr?)')\n}\n\n// OPTION TWO\nmasto.post_toot('Hello World!', message.attachments).then ( success =\u003e {\n        if (success) {\n            message.reply('toot sent successfully!')\n        }\n        else {\n            message.reply('toot could not be sent (longer than 500 characters? unknown erorr?)')\n        }\n    }\n)\n\n```\n\n## Access Token\n\nYou will need your access token which can be found at:\n\n\u003e\n\u003e Preferences --\u003e Development --\u003e New application --\u003e Submit --\u003e Copy Access Token\n\u003e\n\n## Known Issues\n\n* You MAY need to change the updateMedia function of Mastodon to the v2 API. Depends on the user. Instructions to come eventually.\n\n* Versions of `tootcord` less than 0.1.4 may have an issue with a blank FS package interfering with Node.JS built in FS\n\n## Support Me\n\nBy following me on [Mastodon](https://m.skymocha.net/@skymocha), [YouTube](https://www.youtube.com/@skymochi64), [TikTok](https://www.tiktok.com/@skymochi64) or even supporting me on [Patreon](https://www.patreon.com/skymocha)!\n\n## License  \n\nCC-BY-4.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSkyeActsOut%2Ftootcord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSkyeActsOut%2Ftootcord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSkyeActsOut%2Ftootcord/lists"}