Skip to main content

It has random thing, it like a start up for you discord bot

Project description

This is discordRandomStuff it can be a startup for you discord bot or a fun thing for it.

Welcome example

Not in cogs

from discordRandomStuff.welcome import Welcome
from discord.ext import commands
prefix  = "t!"
bot = commands.Bot(command_prefix=prefix)

@bot.event
async def on_member_join(self, member):
    Welcome(channel=735826080153337898) #Replace those numbers a channel id
    Welcome.start() #This will start it
    print("DRS welcome module is loaded") #If this shows up in your conosle logs, that means it is loaded


In cogs

from discordRandomStuff.welcome import Welcome
from discord.ext import commands
class Welcome(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @commands.Cog.listener()  # Event module
    async def on_member_join(self, member):  # defining it
        Welcome(channel=735826080153337898) #Replace those numbers a channel id
        Welcome.start() #This will start it
        print("DRS welcome module is loaded") #If this shows up in your conosle logs, that means it is loaded

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




Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

DiscordRandomStuff-0.0.1.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

DiscordRandomStuff-0.0.1-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page