A discord bot to check if messages have the correct code formatting.

Overview

forthebadge made-with-python

Heroku

discord-code-formatter

A discord bot to check if messages have the correct code formatting.

This was a basic project to help me learn Python and learn a little bit about API's and hosting workers on heroku.

What it does is listens for messages with code inside, that are not formatted properly.

For example, if someone copy and pastes code into a guild for help with using code blocks or syntax highlighting.

If the bot detects code in the message, it will return the message back in the same channel properly highlighted and formatted based on guesslang's best guess. guesslang is not a perfect library in terms of guessing languages, but it works for this purpose. Besides, we don't want the bot triggering for smaller messages anyway.

Unfortunately, I had to disable .INI code detection as some regular messages were flagging the bot.

The !!help call tells users how they can format code and syntax highlight it themselves. It also lists the available markdown highlighting on discord.

You can invite this bot to your server using this link

https://discord.com/api/oauth2/authorize?client_id=908433441102630933&permissions=274877990912&scope=bot

Screenshot 2021-11-12 214707

Thanks for viewing!

This project was built using py-cord, a discord.py wrapper. See more information here https://github.com/Pycord-Development/pycord

This project also uses a library called guesslang, a library to identify code languages from strings. See more here https://github.com/yoeo/guesslang

You might also like...
A Discord bot to scrape textfiles from messages and put them to Hastebin

A Discord bot to scrape textfiles from messages and put them to Hastebin. Intended to use on support servers to help users read textfiles on mobile.

Discord Bot that can translate your text, count and reply to your messages with a personalised text

Discord Bot that can translate your text, count and reply to your messages with a personalised text

Discord Panel is an AIO panel for Discord that aims to have all the needed tools related to user token interactions, as in nuking and also everything you could possibly need for raids

Discord Panel Discord Panel is an AIO panel for Discord that aims to have all the needed tools related to user token interactions, as in nuking and al

A simple Telegram bot that can broadcast messages and media to the bot subscribers. with mongo DB support
A simple Telegram bot that can broadcast messages and media to the bot subscribers. with mongo DB support

π˜½π™§π™€π™–π™™π™˜π™–π™¨π™© π˜½π™€π™© A simple Telegram bot that can broadcast messages and media to the bot subscribers using MongoDB. Features Support mongodb.c

Force-Subscribe-Bot - A Telegram Bot to force users to join a specific channel before sending messages in a group

Introduction A Telegram Bot to force users to join a specific channel before sen

Syrax Check User Bot Discord.py
Syrax Check User Bot Discord.py

Syrax-Check-User-Bot-Discord.py Guida Italiana il bot nasce con lo scopo di poter caricare il proprio nome utente,tag e foto profilo al forum tramite

Karen is a Discord Bot that will check for a list of forbidden words/expressions, removing the message that contains them and replying with another message.

Karen is a Discord Bot that will check for a list of forbidden words/expressions, removing the message that contains them and replying with another message. Everything is highly customizable.

MCNameBot is a fast discord bot that is used to check the availability of a Minecraft name with a simple command.

MCNameBot MCNameBot is a fast discord bot that is used to check the availability of a Minecraft name with a simple command. If you would like to just

A discord bot wrapper for python have slash command

A discord bot wrapper for python have slash command

Owner
Nash Boisvert
Nash Boisvert
Discord bot code to stop users that are scamming with fake messages of free discord nitro on servers in order to steal users accounts.

AntiScam Discord bot code to stop users that are scamming with fake messages of free discord nitro on servers in order to steal users accounts. How to

H3cJP 94 Dec 15, 2022
A discord Server Bot made with Python, This bot helps people feel better by inspiring them with motivational quotes or by responding with a great message, also the users of the server can create custom messages by telling the bot with Commands.

A discord Server Bot made with Python, This bot helps people feel better by inspiring them with motivational quotes or by responding with a great message, also the users of the server can create custom messages by telling the bot with Commands.

Aran 1 Oct 13, 2021
A Discord bot that rewards players in Minecraft for sending messages on Discord

MCRewards-Discord-Bot A Discord bot that rewards players in Minecraft for sending messages on Discord How to setup: Download this git as a .zip, or cl

null 3 Dec 26, 2021
😈 Discord RAGE is a Python tool that allows you to automatically spam messages in Discord

?? Discord RAGE Python tool that allows you to automatically spam messages in Discord ?? Setup Make sure you have Python installed and PIP is added to

Alphalius 4 Jun 12, 2022
Satoshi is a discord bot template in python using discord.py that allow you to track some live crypto prices with your own discord bot.

Satoshi ~ DiscordCryptoBot Satoshi is a simple python discord bot using discord.py that allow you to track your favorites cryptos prices with your own

ThΓ©o 2 Sep 15, 2022
Check and write all account info + Check nitro on account

Discord-Token-Checker Check and write all account info + Check nitro on account Also check https://github.com/GuFFy12/Discord-Token-Parser (Parse disc

null 36 Jan 1, 2023
Easy & powerful bot to check if your all Telegram bots are working or not. This bot status bot updates every 45 minutes & runs for 24x7 hours.

PowerfulBotStatus-IDN-C-X Easy & powerful bot to check if your all Telegram bots are working or not. This bot status bot updates every 45 minutes & ru

IDNCoderX 5 Oct 6, 2022
A Discord bot that generates inspirational quotes & motivating messages whenever a user is sad

Encourage bot is a discord bot that allows users to randomly get Inspirational quotes messages and gives motivational encouragements whenever someone says that he's sad/depressed.

null 1 Nov 25, 2021
Discondelete, is a Discord self-bot to delete dm's or purge all messages from a guild.

Discondelete Discondelete, is a Discord self-bot to delete dm's or purge all messages from a guild. Report Bug Β· Request Feature Table of Contents Abo

core 4 Feb 28, 2022
A discord self bot that replies to messages using cleverbot

cleverbot-discord-self A discord self bot that replies to messages using cleverbot Bot will respond to DMs and channels in the channels list. Need to

null 0 Jan 11, 2022