diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4acd06b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config.py diff --git a/__pycache__/config.cpython-310.pyc b/__pycache__/config.cpython-310.pyc new file mode 100644 index 0000000..68d35e4 Binary files /dev/null and b/__pycache__/config.cpython-310.pyc differ diff --git a/auroraBot.py b/auroraBot.py new file mode 100644 index 0000000..d2d98db --- /dev/null +++ b/auroraBot.py @@ -0,0 +1,25 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +import discord +from discord.ext import commands +import config + +TOKEN = config.token +ID = config.channel_id + +intents = discord.Intents.all() + +bot = commands.Bot(command_prefix='!', intents=intents) + +@bot.command(name='sky', help='Shows the latest image from the All Sky Camera in Kiruna') +async def ASC(ctx): + message = 'https://www.irf.se/alis/allsky/krn/latest.jpeg' + if ctx.channel.id != ID: + await ctx.send(f"Please keep this stuff in <{ID}>") + return + else: + await ctx.send(message) + return + +bot.run(TOKEN) \ No newline at end of file