<reponame>lifehackerhansol/Sycamore<gh_stars>0
# about command and membercount command from extras.py
#
# Copyright 2021 Nintendo Homebrew
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import discord
from discord.ext import commands


class Extras(commands.Cog):
    """
    Extra things.
    """
    def __init__(self, bot):
        self.bot = bot

    @commands.command(aliases=['about'])
    async def sycamore(self, ctx):
        """About Professor Sycamore"""
        embed = discord.Embed(title="Professor Sycamore", color=discord.Color.green())
        embed.set_author(name="Maintained by lifehackerhansol")
        embed.set_thumbnail(url="https://raw.githubusercontent.com/hansoljin/sycamore-assets/master/bot/sycamore.png")
        embed.url = "https://github.com/hansoljin/Sycamore"
        embed.description = "Professor Sycamore, the Pokemon X and Y Demakes Discord bot!"
        await ctx.send(embed=embed)

    @commands.guild_only()
    @commands.command()
    async def membercount(self, ctx):
        """Prints the member count of the server."""
        await ctx.send(f"{ctx.guild.name} has {ctx.guild.member_count:,} members!")


def setup(bot):
    bot.add_cog(Extras(bot))

# about command and membercount command from extras.py
#
# Copyright 2021 Nintendo Homebrew
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import discord
from discord.ext import commands


class Extras(commands.Cog):
    """
    Extra things.
    """
    def __init__(self, bot):
        self.bot = bot

    @commands.command(aliases=['about'])
    async def sycamore(self, ctx):
        """About Professor Sycamore"""
        embed = discord.Embed(title="Professor Sycamore", color=discord.Color.green())
        embed.set_author(name="Maintained by lifehackerhansol")
        embed.set_thumbnail(url="https://raw.githubusercontent.com/hansoljin/sycamore-assets/master/bot/sycamore.png")
        embed.url = "https://github.com/hansoljin/Sycamore"
        embed.description = "Professor Sycamore, the Pokemon X and Y Demakes Discord bot!"
        await ctx.send(embed=embed)

    @commands.guild_only()
    @commands.command()
    async def membercount(self, ctx):
        """Prints the member count of the server."""
        await ctx.send(f"{ctx.guild.name} has {ctx.guild.member_count:,} members!")


def setup(bot):
    bot.add_cog(Extras(bot))
# about command and membercount command from extras.py # # Copyright 2021 Nintendo Homebrew # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Extra things. About Professor Sycamore Prints the member count of the server.