Skip to content

Commit

Permalink
Renamed bot
Browse files Browse the repository at this point in the history
  • Loading branch information
eladavron committed Dec 19, 2020
1 parent 854fe14 commit 023f6c5
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 14 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 5 additions & 3 deletions CQXBot/bedtime.py → CosmoGolem/bedtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ async def get_bedtime(self, ctx):
async def bedtime(self, ctx):
await ctx.send(
embed=embedder(
"To set your bedtime, type `.set_bedtime <bedtime> <morning> <utc_offset>`\n"
"with `<bedtime>` and `<morning>` being integers between 0 and 23, and `<utc_offset>` being between -12 and 12.\n"
"\nTo check your bedtime, type `.get_bedtime`\nTo remove your bedtime, type `.remove_bedtime`"
f"To set your bedtime, type `{self.bot.command_prefix}set_bedtime <bedtime> <morning> <utc_offset>`\n"
"with `<bedtime>` and `<morning>` being integers between 0 and 23,"
"and `<utc_offset>` being between -12 and 12.\n"
f"\nTo check your bedtime, type `{self.bot.command_prefix}get_bedtime`\n"
f"To remove your bedtime, type `{self.bot.command_prefix}remove_bedtime`"
)
)

Expand Down
12 changes: 6 additions & 6 deletions CQXBot/commands.py → CosmoGolem/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import discord
from discord.ext import commands

from _settings import Settings
from _helpers import Color, LOG_PATH, embedder, exception_handler
from archive import archive, archive_server, parse_channel_role_overrides

Expand Down Expand Up @@ -95,7 +95,7 @@ async def ud(self, ctx, *, query):

# Mod Commands
@commands.command(help="Posts the given message or image to the given channel as the bot.")
@commands.has_role("mods")
@commands.has_role(Settings.static_settings["mod_role_id"])
async def echo(self, ctx, channel_name, *, echoString=None):
""" Allows puppeteering the bot by having it send commands or images to other channels """
if not ctx.message.channel_mentions:
Expand All @@ -117,17 +117,17 @@ async def echo(self, ctx, channel_name, *, echoString=None):
await channel.send(file=discord.File(f, filename=filename))
elif echoString is None:
await ctx.send("Cannot echo an empty message!")
await channel.send(echoString)
await channel.send(embed=embedder(echoString))

### Generic Commands ###
@commands.command(help="Gives generic details about the bot.")
async def info(self, ctx):
""" Handles the "info" command """
await ctx.trigger_typing()
await ctx.send(embed=embedder("Written in Python 3.9 by Ambious", title="CosmoQuestX Bot", color=Color.AQUA))
await ctx.send(embed=embedder("Written in Python 3.9 by Ambious", title="CosmoGolem", color=Color.AQUA))

@commands.command(help="Archives a channel to a file then uploads to the where you request.")
@commands.has_role("Moderator")
@commands.has_role(Settings.static_settings["mod_role_id"])
async def archive(self, ctx, channel_name):
""" Archives an entire channel into a json and uploads it to the archive channel """
if not ctx.message.channel_mentions:
Expand All @@ -146,7 +146,7 @@ async def archive(self, ctx, channel_name):
await archive(channel, where_to_upload)

@commands.command(help="Archives the entire server.")
@commands.has_role("Moderator")
@commands.has_role(Settings.static_settings["mod_role_id"])
async def archive_server(self, ctx):
""" Archives an entire server into a jsons and uploads it to a zip """
if ctx.message.channel_mentions:
Expand Down
4 changes: 2 additions & 2 deletions CQXBot/cqxbot.py → CosmoGolem/cqxbot.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
cqxbot's main module
CosmoGolem's main module
"""

import os
Expand Down Expand Up @@ -32,7 +32,7 @@ def guild(self):
return self.get_guild(self.settings["server_id"])


bot = Bot(command_prefix="$", description="CosmoQuestX Bot 1.0", pm_help=True)
bot = Bot(command_prefix="$", description="CosmoGolem 1.0", pm_help=True)


def startup(debug):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM gorialis/discord.py
WORKDIR /

COPY requirements.txt ./
COPY CQXBot app
COPY CosmoGolem app
COPY data data

VOLUME [ "/data" ]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CosmoQuestX Bot
# CosmoGolem
A bot for the CosmoQuestX Discord Server.
***Both the bot and this readme file are still under construciton!***

Expand All @@ -20,7 +20,7 @@ use `docker-compose`:
(Make sure you install pip as well)
* Once installed, navigate to the root of the repository and type:
`pip install -r requirements.txt`
* Start the bot using `python CQXBot/cqxbot.py`
* Start the bot using `python CosmoGolem/cqxbot.py`

### The Settings File
You will have to edit the settings file in the `data` folder before you can actually use the bot.
Expand Down

0 comments on commit 023f6c5

Please sign in to comment.