{"id":23046539,"url":"https://github.com/agenthackeryt/discord.prefixdb","last_synced_at":"2025-10-26T16:37:41.602Z","repository":{"id":57212777,"uuid":"414528549","full_name":"AgentHackerYT/discord.prefixdb","owner":"AgentHackerYT","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-07T08:57:29.000Z","size":4,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T08:51:48.087Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AgentHackerYT.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":"2021-10-07T08:56:13.000Z","updated_at":"2021-12-02T16:50:06.000Z","dependencies_parsed_at":"2022-09-12T11:32:30.014Z","dependency_job_id":null,"html_url":"https://github.com/AgentHackerYT/discord.prefixdb","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/AgentHackerYT%2Fdiscord.prefixdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgentHackerYT%2Fdiscord.prefixdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgentHackerYT%2Fdiscord.prefixdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgentHackerYT%2Fdiscord.prefixdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AgentHackerYT","download_url":"https://codeload.github.com/AgentHackerYT/discord.prefixdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246927809,"owners_count":20856193,"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-15T22:28:13.775Z","updated_at":"2025-10-26T16:37:36.561Z","avatar_url":"https://github.com/AgentHackerYT.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discord.PrefixDB\n- Made Using QuickDB\n- Simple To Use\n- Better Then Before\n# How To Use?\n```js\nconst { PrefixDB } = require(\"discord.prefixdb\")\nconst Discord = require(\"discord.js\")\nconst client = new Discord.Client({ intents: [Discord.Intents.FLAGS.GUILDS ,Discord.Intents.FLAGS.GUILD_MESSAGES, Discord.Intents.FLAGS.DIRECT_MESSAGES, Discord.Intents.FLAGS.GUILD_MEMBERS,] })\nconst config = \n{\n    defaultprefix:\"!\",\n    token:\"TOKEN_HERE\"\n}\nclient.on('ready', () =\u003e{\n    console.log('Ready!!')\n})\nclient.on('messageCreate' async(message) =\u003e{\n    const db = new PrefixDB({message: message})\n    let prefix = db.get(config.defaultprefix)\n     \tif (!message.content.startsWith(prefix) || message.author.bot) return;\n\n\tconst args = message.content.slice(prefix.length).trim().split(' ');\n\tconst command = args.shift().toLowerCase();\n    if(command === \"setprefix\"){\n        db.set(args[0])\n        message.channel.send({content: 'Successfully changed the prefix'})\n    }\n    if(command === \"deleteprefix\"){\n        db.delete()\n    }\n    if(command === \"allprefix\"){\nconsole.log(db.all())\n    }\n})\nclient.login(config.token)\n```\n# All Functions\n- Creating A DB\n```js\nconst { PrefixDB } = require('discord.prefixdb')\nconst db = new PrefixDB({message: MessageProperty(Object)})\n```\n- Get The Prefix\n```js\n/**\n * @param {defaultprefx} string;\n * */\ndb.get(\"!\" /*\u003c- DefaultPrefix*/)\n```\n- All Prefix Data\n```js\nconsole.log(db.all())\n```\n- Delete Prefix for a Server\n```js\n/**\n * @param {prefix} string;\n * */\ndb.set(prefix)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagenthackeryt%2Fdiscord.prefixdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagenthackeryt%2Fdiscord.prefixdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagenthackeryt%2Fdiscord.prefixdb/lists"}