You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.0 KiB
40 lines
1.0 KiB
from random import randrange
|
|
import discord
|
|
|
|
from redbot.core import commands
|
|
from redbot.core.data_manager import bundled_data_path
|
|
|
|
|
|
Cog = getattr(commands, "Cog", object)
|
|
|
|
|
|
class Skyrim(Cog):
|
|
"""
|
|
Says a random line from Skyrim.
|
|
"""
|
|
|
|
@commands.command()
|
|
async def guard(self, ctx):
|
|
"""
|
|
Says a random guard line from Skyrim.
|
|
"""
|
|
filepath = bundled_data_path(self) / "lines.txt"
|
|
with filepath.open() as file:
|
|
line = next(file)
|
|
for num, readline in enumerate(file):
|
|
if randrange(num + 2):
|
|
continue
|
|
line = readline
|
|
await ctx.maybe_send_embed(line)
|
|
|
|
@commands.command()
|
|
async def nazeem(self, ctx):
|
|
"""
|
|
Do you get to the Cloud District very often?
|
|
|
|
Oh, what am I saying, of course you don't.
|
|
"""
|
|
await ctx.maybe_send_embed(
|
|
"Do you get to the Cloud District very often? Oh, what am I saying, of course you don't."
|
|
)
|