{"id":19184765,"url":"https://github.com/akrasio/ahnidev","last_synced_at":"2026-01-06T03:07:13.487Z","repository":{"id":108026982,"uuid":"448746049","full_name":"Akrasio/AhniDev","owner":"Akrasio","description":"A utility package for discord bots to use.","archived":false,"fork":false,"pushed_at":"2024-06-01T15:03:59.000Z","size":168,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-18T18:07:54.403Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.ahni.dev","language":"JavaScript","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/Akrasio.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-17T03:48:57.000Z","updated_at":"2024-06-01T15:04:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"130b46cd-bf39-4806-b160-eb0b43995d99","html_url":"https://github.com/Akrasio/AhniDev","commit_stats":{"total_commits":36,"total_committers":3,"mean_commits":12.0,"dds":"0.36111111111111116","last_synced_commit":"7ef5934022c4d7fa5ce546c8857b52db0a25f008"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akrasio%2FAhniDev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akrasio%2FAhniDev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akrasio%2FAhniDev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akrasio%2FAhniDev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Akrasio","download_url":"https://codeload.github.com/Akrasio/AhniDev/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245106844,"owners_count":20561776,"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-11-09T11:08:09.699Z","updated_at":"2026-01-06T03:07:13.417Z","avatar_url":"https://github.com/Akrasio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ahni / API\n*(Might be buggy still)*\n\n## Installation\n```bash\nnpm i ahnidev\n```\n# How to use\n```js\nconst { AhniClient } = require('ahnidev');\nconst Ahni = new AhniClient({ KEY: \"Your-API-Key-Here\", url:\"https://kyra.tk\" }) // URL Required if main domain changed.\n\n// NSFW Endpoints\napi.nsfw(\"thighs\").then(result =\u003e {\n    console.log(result)\n})\n\n// Chat Endpoint\napi.chat(\"MESSAGE%20CONTENT\", \"USERID\").then(result =\u003e {\n    console.log(result)\n})\n```\n## Discord Bot lists Posting;\n```js\nconst { AhniLists } = require('ahnidev');\nconst api = new AhniLists({})\n// Post server count\n// \"topgg\", \"disforge\", \"boats\", \"bfd\", \"discords\";\napi.postCount(\"botId\", {serverCount: 2, botList: \"topgg\", botListKey: \"The-Api.Key\"}).then(result =\u003e {\n    console.log(result)\n})\n// Auto-Post server count\n// Most lists have a waiting period (ratelimit); So please make sure you know to not bypass them with interval. (ie: Disforge has a 1/1h ratelimit)\napi.autopostCount(\"botId\", { serverCount: 2, botList: \"disforge\", botListKey: \"The-Api.Key\", interval: 60 }).then(result =\u003e {\n    console.log(result)\n})\n```\n\n## AutoUnmute + Mute system\n\u003e Mutes and unmutes.\n```js\n// index.js\n\nconst { Client } = require('discord.js');\nconst client = new Client({ intents: [\"GUILDS\", \"GUILD_MEMBERS\"]});// Not sure about guild_members..?\nconst { AhniClient } = require('ahnidev');\nconst Ahni = new AhniClient({ KEY: \"Your-API-Key-Here\", url:\"https://kyra.tk\" }) // URL Required if main domain changed.\nclient.Ahni = Ahni;\n\nclient.Ahni.connectToMongoDB(\"Your-mongoDB-URL-Here\");\nclient.Ahni.timed(client)// auto unmutes\n\n// event when someones unmuted\nclient.on(\"timedUnmute\", (user, guild)=\u003e{\n    console.log(`${user.name} (${user.id}) was unmuted in ${guild.name} (${guild.id})`)\n})\n...\n```\n```js\n// mute.js\n        ...\n    /** member { Discord.User }\n      * time { Number }\n      * reason { String }\n      */\n    client.Ahni.mute(member, time, reason)\n        ...\n```\n```js\n// unmute.js\n        ...\n     /** \n      * client { Discord.Client }\n      * user { Discord.User }\n      */\n    client.Ahni.forced(client, user)\n        ...\n```\n\n## Quote Command.js\n\u003e Quotes a message via a messageID from message channel or Message URL.\n```js\n        ...              ...                 ...\n                // QuoteCommand.js\nclient.Ahni.quoteId(client, args[0], msg.channel).then(res =\u003e { \n// msg.channel (OR message.channel) is needed just the way it is unless you call the current channel differently.\nconst embed = new MessageEmbed()\n    .setDescription(`\\`\\`\\`${res.content}\\`\\`\\``)\n    .setTimestamp(res.createdAt)\n    .setColor(res.author.accentColor || \"WHITE\")\n    .setAuthor(res.author.username, res.author.avatarURL({ type: \"png\", dynamic: true, size: 4096 }), res.author.avatarURL({ type: \"png\", dynamic: true, size: 4096 }))\nif (res.attachments \u0026\u0026 res.attachments.size \u003e 0) {\n    embed.setImage(res.attachments.first().url)\n}\n    console.log(res.content)\n    msg.reply({ embeds: [embed] });\n    });\n\n...              ...                 ...\n```\n```js\n// Captcha system / event\nconst { AhniCaptcha } = require(\"ahnidev\");\nclient.on(\"guildMemberAdd\", (member) =\u003e {\n    \n// =============================================================================\n    //  for captcha setup / sending.\n    // channelID can be either a category OR a GUILD_TEXT/text-channel ;)\n    const role = member.guild.roles.cache.get(\"xxxxxxxxxxxxxxxxx\");\n    const channel = member.guild.channels.fetch(\"xxxxxxxxxxxxxxxxx\");\n    new AhniCaptcha(client, {channelID: channel.id, attempts: 3, caseSensitive: false}).present(member, role, channel);\n// =============================================================================\n    // For antiJoin raid checking: (WIP)\n    new AhniCaptcha(client).check(member, days, roleId, joinCount);\n    // member = user\n    // days = amount of days user has been registered for\n    // roleId = mute/unverified roleId\n    // joinCount = max amount of new joins before kicking this amount of users that joined recently. (the time frame is 6500ms [6~ seconds])\n// =============================================================================\n\n});\n```\n# endpoints\n--------------------------\n### || NSFW  ||\n\n- Just read Docs please...\n\n### || SFW  ||\n- chat\n\nFor an up to date list on endpoints visit [kyra.tk](https://kyra.tk) | [kyra.tk](https://kyra.tk)\n\nFor support join our [discord](https://discord.gg/invite/P5SbJypjCF)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakrasio%2Fahnidev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakrasio%2Fahnidev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakrasio%2Fahnidev/lists"}