first version with one command (sky)

This commit is contained in:
Xaloc 2023-03-20 19:54:38 +01:00
parent 1b583f5d3e
commit 9b034e8436
3 changed files with 26 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
config.py

Binary file not shown.

25
auroraBot.py Normal file
View File

@ -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)