The YouTube Subscriber Verifier is a Discord bot designed to verify if users have subscribed to a specified YouTube channel. It analyzes images uploaded by users to check for text that matches the channel's name or specific keywords. If a match is found, it grants a role to the user in the Discord server. The bot also supports saving subscriber data for record-keeping. π
- Image Analysis: Uses Tesseract.js and sharp to process and analyze uploaded images. πΌοΈ
- Keyword Matching: Checks for specific keywords or the channel name in the image text. π
- Role Assignment: Grants a specified role to users who successfully verify their subscription. ποΈ
- Data Saving: Optionally saves verified user data in a
subscriber.json
file. πΎ - Ephemeral Responses: Sends ephemeral messages to users for privacy. π
- Node.js (v16 or higher recommended) π
npm
oryarn
for managing packages π¦- A Discord bot token π
- A YouTube channel name to verify subscriptions πΊ
-
Clone the repository:
git clone https://github.com/devuuuxd/YouTube-Subscriber-Verifier.git cd YouTube-Subscriber-Verifier
-
Install dependencies:
npm install
-
Create a
config.js
file in the root directory with the following content:module.exports = { token: "YOUR_BOT_TOKEN_HERE", // Add your bot's token here channel_name: "@devuuuu_xd", // Specify your YouTube channel's name here role_id: "YOUR_ROLE_ID_HERE", // ID of the role to be given keywords: "SUBSCRIBED", // Specify the keywords for analyzing the image save_data: "false" // Set to "true" to save data in subscriber.json, "false" otherwise };
-
Run the bot:
node index.js
-
Setting Up: Ensure that your bot has the necessary permissions in your Discord server, including managing roles and sending messages. π οΈ
-
Bot Behavior: The bot will:
- Check if the user is already verified.
- Analyze the uploaded image to detect the specified channel name or keywords.
- Assign the role if the criteria are met.
- Optionally save user data based on your configuration.
-
Verify Command:
- Type
/verify
in a channel where the bot is present. - Attach an image that contains text related to the YouTube channel name or specified keywords.
- The bot will process the image and respond with the verification result.
- Type
-
Response:
- If the image contains the correct text, the bot will assign the role and confirm the verification.
- If the text is not found, the bot will send an ephemeral message with instructions or a sample image.
- Bot Not Responding: Ensure your bot is online and the token in
config.js
is correct. - Permission Issues: Verify that the bot has appropriate permissions in your Discord server.
- Image Issues: Make sure the image format is supported and accessible.
- Check the changelog and other releases here. π
For any questions or support, please open an issue on the GitHub repository or contact me directly on our Team's Discord Server Kronix Development.
Happy verifying! π