-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiscord-cowsay.py
89 lines (69 loc) · 2.29 KB
/
discord-cowsay.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import discord
from discord.ext import commands
import cowsay
import os
from dotenv import load_dotenv
DESCR = '''A simple Cowsay bot written in Python by github.com/sambhavsaggi'''
load_dotenv()
token = os.getenv('TOKEN')
prefix = os.getenv('PREFIX')
helptext = 'Prefix: `' + prefix + '`\nCharacters: beavis, cheese, daemon, cow, dragon, ghostbusters, kitty, meow, milk, pig, stegosaurus, stimpy, turkey, turtle, tux\nExample: `?cow hi`'
intents = discord.Intents.default()
intents.presences = False
intents.typing = False
bot = commands.Bot(command_prefix=commands.when_mentioned_or(prefix),
description=DESCR,
intents=intents
)
@bot.event
async def on_ready():
print('Logged in as')
print(bot.user.name)
print(bot.user.id)
print('------')
@bot.command()
async def beavis(ctx, *, text):
await ctx.send('```' + cowsay.beavis(text) + '```')
@bot.command()
async def cheese(ctx, *, text):
await ctx.send('```' + cowsay.cheese(text) + '```')
@bot.command()
async def daemon(ctx, *, text):
await ctx.send('```' + cowsay.daemon(text) + '```')
@bot.command()
async def cow(ctx, *, text):
await ctx.send('```' + cowsay.cow(text) + '```')
@bot.command()
async def dragon(ctx, *, text):
await ctx.send('```' + cowsay.dragon(text) + '```')
@bot.command()
async def ghostbusters(ctx, *, text):
await ctx.send('```' + cowsay.ghostbusters(text) + '```')
@bot.command()
async def kitty(ctx, *, text):
await ctx.send('```' + cowsay.kitty(text) + '```')
@bot.command()
async def meow(ctx, *, text):
await ctx.send('```' + cowsay.meow(text) + '```')
@bot.command()
async def milk(ctx, *, text):
await ctx.send('```' + cowsay.milk(text) + '```')
@bot.command()
async def pig(ctx, *, text):
await ctx.send('```' + cowsay.pig(text) + '```')
@bot.command()
async def stegosaurus(ctx, *, text):
await ctx.send('```' + cowsay.stegosaurus(text) + '```')
@bot.command()
async def stimpy(ctx, *, text):
await ctx.send('```' + cowsay.stimpy(text) + '```')
@bot.command()
async def turkey(ctx, *, text):
await ctx.send('```' + cowsay.turkey(text) + '```')
@bot.command()
async def turtle(ctx, *, text):
await ctx.send('```' + cowsay.turtle(text) + '```')
@bot.command()
async def tux(ctx, *, text):
await ctx.send('```' + cowsay.tux(text) + '```')
bot.run(token)