Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.on("message", async message => {
- if(message.content.startsWith(prefix + "hastebin")){
- let content = '';
- let fillter = m => m.author.id === message.author.id
- await message.channel.send(" hastebin اكتب الكود الان للرفع علي ").then(e => {
- message.channel.awaitMessages(fillter, { time: 60000, max: 1 })
- .then(co => {
- content = co.first().content;
- co.first().delete();
- hastebin(content).then(r => {
- e.edit(`Hastebin Link ${r}`);
- }).catch(console.error);
- })
- })
- }
- });
- // Nomsy Paste
- const h = require('nomsy-paste');
- client.on("message", async message => {
- if(message.content.startsWith(prefix + "nomsy")){
- let content = '';
- let fillter = m => m.author.id === message.author.id
- await message.channel.send(" nomsy اكتب الكود الان للرفع علي ").then(e => {
- message.channel.awaitMessages(fillter, { time: 60000, max: 1 })
- .then(co => {
- content = co.first().content;
- co.first().delete();
- h(content, 'js').then(res => {
- e.edit(`Nomsy-Paste Link ${res}`);
- }).catch(console.error);
- })
- })
- }
- });
- // PasteBin
- var pbin = require('pbin-guest');
- client.on("message", async message => {
- if(message.content.startsWith(prefix + "pastebin")){
- let content = '';
- let title = '';
- let fillter = m => m.author.id === message.author.id
- await message.channel.send(" pastebin اكتب الكود الان للرفع علي ").then(e => {
- message.channel.awaitMessages(fillter, { time: 60000, max: 1 })
- .then(co => {
- title = co.first().content;
- co.first().delete();
- e.edit(`اكتب الكود ناو`)
- message.channel.awaitMessages(fillter, { time: 60000, max: 1 })
- .then(col=> {
- content = col.first().content;
- col.first().delete();
- pbin.paste({title: title, code: content}, '870d2b8b253779b0827c7512b2fe6c51', function(link, err){
- if(err){
- e.edit(err)
- }
- e.edit(link)
- });
- })
- })
- })
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment