Cleanup module
This commit is contained in:
@@ -1,2 +1,28 @@
|
|||||||
# Handle major modules of package
|
import nextcord as nc
|
||||||
import * from ./__main__
|
from nextcord.ext import commands
|
||||||
|
from typing import Optional
|
||||||
|
import os
|
||||||
|
|
||||||
|
bot = commands.Bot()
|
||||||
|
|
||||||
|
@bot.event
|
||||||
|
async def on_ready():
|
||||||
|
print(f'We have logged in as {bot.user}')
|
||||||
|
|
||||||
|
@bot.slash_command(name="summarize", description="Summarize all or part of an article", dm_permission=True)
|
||||||
|
async def summarize(
|
||||||
|
interaction: nc.Interaction,
|
||||||
|
article: str,
|
||||||
|
part: Optional[str] = nc.SlashOption(required=False)
|
||||||
|
):
|
||||||
|
print("Will summarize article.")
|
||||||
|
|
||||||
|
def main():
|
||||||
|
# TODO: Import bot token from env
|
||||||
|
bot.run(os.environ["DISCORD_TOKEN"])
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
print("Handy Helper has Begun!")
|
||||||
|
main()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
import nextcord
|
|
||||||
from nextcord.ext import commands
|
|
||||||
import os
|
|
||||||
|
|
||||||
bot = commands.Bot()
|
|
||||||
|
|
||||||
@bot.event
|
|
||||||
async def on_ready():
|
|
||||||
print(f'We have logged in as {bot.user}')
|
|
||||||
|
|
||||||
@bot.slash_command(name="summarize", description="Summarize all or part of an article", dm_permission=True)
|
|
||||||
async def summarize(
|
|
||||||
interaction: nextcord.Interaction,
|
|
||||||
article: str,
|
|
||||||
part: Optional[str] = SlashOption(required=False)
|
|
||||||
):
|
|
||||||
print("Will summarize article.")
|
|
||||||
|
|
||||||
def main():
|
|
||||||
# TODO: Import bot token from env
|
|
||||||
bot.run(os.environ["DISCORD_TOKEN"])
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
print("Handy Helper has Begun!")
|
|
||||||
Reference in New Issue
Block a user