All Projects → dcdunkan → pastebin-bot

dcdunkan / pastebin-bot

Licence: MIT License
Advanced functional Pastebin Telegram Bot made using better-pastebin and TelegrafJS. This bot will help you to create pastes (Texts) on Pastebin which is a text cloud.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to pastebin-bot

cfworker-middware-telegraf
Make telegraf (a telegram bot framework) useable in Cloudflare Workers
Stars: ✭ 23 (+43.75%)
Mutual labels:  telegram-bot, telegraf
Nayumi
A cute bot of Telegram.
Stars: ✭ 12 (-25%)
Mutual labels:  telegram-bot, telegraf
Defend-The-Castle
Telegram Bot Game - Defend The Castle
Stars: ✭ 21 (+31.25%)
Mutual labels:  telegram-bot, telegraf
formatbot1
Make instant view easily and fast, from any article on the internet in the best messenger ever Telegram
Stars: ✭ 127 (+693.75%)
Mutual labels:  telegram-bot, telegraf
quizquickanswer-telegram-game-bot
🎮 Funny quiz game for telegram, play with friends on your group!
Stars: ✭ 15 (-6.25%)
Mutual labels:  telegram-bot, telegraf
Telegraf
Modern Telegram Bot Framework for Node.js
Stars: ✭ 5,178 (+32262.5%)
Mutual labels:  telegram-bot, telegraf
podsearch bot
Telegram bot that searches Podcast in iTunes store.
Stars: ✭ 28 (+75%)
Mutual labels:  telegram-bot, telegraf
telegraf-calendar-telegram
Inline calendar for Telegram bots using Telegraf framework
Stars: ✭ 43 (+168.75%)
Mutual labels:  telegram-bot, telegraf
Telegraf-Test
Telegraf Test - Simple Test ToolKit of Telegram Bots
Stars: ✭ 22 (+37.5%)
Mutual labels:  telegram-bot, telegraf
pastebin-api
A very simple pastebin npm package to interact with the pastebin api!
Stars: ✭ 20 (+25%)
Mutual labels:  pastebin, pastebin-api
BooksAndBot
Telegram inline bot. Search for books and share them in a conversation
Stars: ✭ 26 (+62.5%)
Mutual labels:  telegram-bot, telegraf
telegram-keyboard
Simple and powerful reply and inline keyboard builder for Telegram Bots
Stars: ✭ 70 (+337.5%)
Mutual labels:  telegram-bot, telegraf
FallenMusic
A Super Fast and Powerful Telegram bot for streaming music on telegram videochats, Powered by PyTgCalls and Pyrogram
Stars: ✭ 30 (+87.5%)
Mutual labels:  telegram-bot
SmartyScheduleBot
Telegram timetable bot, for Zhytomyr Ivan Franko State University students. It uses Politek-soft Dekanat system for getting data. With 2000+ active users. Бот расписания для Телеграм.
Stars: ✭ 22 (+37.5%)
Mutual labels:  telegram-bot
spigot-tg-bridge
Connect Telegram chats and Minecraft servers seamlessly
Stars: ✭ 27 (+68.75%)
Mutual labels:  telegram-bot
everyone-bot
Telegram bot to get everyone's attention in a group chat. Like @everyone in other messaging applications.
Stars: ✭ 52 (+225%)
Mutual labels:  telegram-bot
telegram-support-bot
A Telegram ticketing/supporting system.
Stars: ✭ 180 (+1025%)
Mutual labels:  telegram-bot
VideoPlayerBot
An Telegram Bot By @AsmSafone To Stream Videos in Telegram Voice Chat. This is Also The Source Code of The Bot Which is Being Used In Our Support Group! ❤️
Stars: ✭ 187 (+1068.75%)
Mutual labels:  telegram-bot
RedditDownloaderBot
A reddit downloader telegram bot
Stars: ✭ 32 (+100%)
Mutual labels:  telegram-bot
coinmarketcap-new-listings-sniper-bot
Sniper bot to buy new tokens listed on Coinmarketcap.
Stars: ✭ 55 (+243.75%)
Mutual labels:  telegram-bot

I know that this code is not perfect. Even good. I am a total beginner, so please forgive the mistakes that have been made. I will be correcting them while i go forward. Please star this if you liked it.

$ pastebin-bot.js V2

Version 2 of Pastebin Bot

Advanced functional Pastebin Telegram Bot made using better-pastebin and TelegrafJS. This bot will help you to create pastes (Texts) on Pastebin [1] which is a text cloud. Here is a running example of the bot @pstbinbot on telegram.

Packages used : telegraf, firebase, better-pastebin, node-fetch, dotenv

contents

How to use? | Deploy | To-Do | Any Ideas?

ADDED features

  • Now send a text kind file to start pasting from that file.
  • Download the created paste as a file.
  • Help command, About command.
  • Firebase userid logging.
  • Paste logging inside telegram.

$ how to use? (BASIC)

  • Go to @pstbinbot
  • Send a Text you want to paste.
  • Send the Title for the paste when the bot asks.
  • Then when the bot asks for A method to paste, choose an option from them. Either login and paste, or paste as guest.
  • Customize the optional options if you want to. Such as Paste Expiry, Paste exposure (Public/Private/Unlisted), and the syntax.
  • Then the bot will ask you to confirm the paste if you are pasting as a guest. Or it will ask for username and password to login and paste. We won't be either storing or logging your both username and password. The bot will save them to it's session storage, and delete your messages after you send them. Also, the bot will set the values to undefined after pasting.
  • After pasting, you will get a link for the paste. Also you can generate embed links for the paste.

$ deploy

Simply deploy the application to heroku by clicking the button below. You will need a telegram bot token, a pastebin developer key, and your application's subdomain or the domain you are using. Read below to find how to get all the values.

Deploy

  • BOT_TOKEN : Get this value from BotFather on telegram by creating a new bot.
  • BOT_USERNAME : Your bot's username. This will be used to create deep linking which is used to embed code, download paste as file features. Enter without@
  • PASTE_DEVKEY : You can get this value from here after logging into pastebin.
  • BOT_DOMAIN : Set this value to <yourappname>.herokuapp.com. Or if you are using a custom domain, enter it without https:// or slash '/' at the end.
  • LOG_CHANNEL : To log user actions, provide a chat ID, or channel ID where the bot is an admin.
  • FIREBASE : Set to true if you want to log users in firebase' realtime database. You have to set the other required parameters to activate this features completely. Required Parameters for firebase feature.
    • FB_APIKEY : ONLY NEEDED IF FIREBASE IS SET TO TRUE. Get this value while creating a firebase app.
    • FB_AUTHDOMAIN : ONLY NEEDED IF FIREBASE IS SET TO TRUE. Get this value while creating a firebase app.
    • FB_DATABASEURL : ONLY NEEDED IF FIREBASE IS SET TO TRUE. Get this value while creating a firebase app.
    • FB_PROJECTID : ONLY NEEDED IF FIREBASE IS SET TO TRUE. Get this value while creating a firebase app.
    • FB_STORAGEBUCKET : ONLY NEEDED IF FIREBASE IS SET TO TRUE. Get this value while creating a firebase app.
    • FB_MESSAGINGSENDERID : ONLY NEEDED IF FIREBASE IS SET TO TRUE. Get this value while creating a firebase app.
    • FB_APPID : ONLY NEEDED IF FIREBASE IS SET TO TRUE. Get this value while creating a firebase app.
    • FB_MEASUREMENTID : ONLY NEEDED IF FIREBASE IS SET TO TRUE. Get this value while creating a firebase app.

The firebase project parameters should look like

var firebaseConfig = {
  apiKey: "AIzaSyDOCAbC123dEf456GhI789jKl01-MnO",
  authDomain: "myapp-project-123.firebaseapp.com",
  databaseURL: "https://myapp-project-123.firebaseio.com",
  projectId: "myapp-project-123",
  storageBucket: "myapp-project-123.appspot.com",
  messagingSenderId: "65211879809",
  appId: "1:65211879909:web:3ae38ef1cdcb2e01fe5f0c",
  measurementId: "G-8GSGZQ44ST"
};

Get the required values from there.

$ to-do

  • Log in and paste mode.
  • Option to customize the optional values such as expiry, exposure, syntax.
  • Get the embed code.
  • Download the paste as a file.
  • Create a paste from file.
  • Characters more than 4096 (Telegram's limit).
  • More commands.
  • List a user's paste. And list command to list the pastes made with the bot.
  • Settings tab for setting default values to the optionals.
  • Getting a paste's content.

$ contribute

Please make an issue or pull a request if you got any ideas. Also, this project is completely open-source. You can fork it and edit as you want. Also, do not forget to give it a star.

[1]: Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

Go back to top ^

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].