Giter Club home page Giter Club logo

clarence-bot's Introduction

Clarence Bot

Clarence is a multipurpose discord bot with admin, fun and information commands


This bot features multiple command types from:

  • Admin
  • Fun
  • General
  • Info

Installation

Docker

Due to the Publish.yml workflow, the newest build will automatically be pushed to DockerHub.

Using a tool like Ouroboros, you can automatically update containers without the need for restarts.

docker run -d \
--name=clarence \
-p 6002:6002 \
-e DISCORD_TOKEN='INSERT DISCORD TOKEN' \
-e MONGOOSE='INSERT MONGODB URL' \
-e OPEN_WEATHERS_API='INSERT OPENWEATHER API KEY' \
-e RAPID_API ='INSERT RAPID API KEY' \
-e PREFIX='-' \
--restart unless-stopped \
kieranr27/clarence:latest

Development

Docker

  • See the tutorial, after going through it you are expected to:
    • Create a new application & make it a bot, from here.
    • Don't forget to give it the Privileged Gateway Intents
    • Invite your bot to your discord server.
    • Get your token & paste in in .env (rename .env.template to .env)
    • Default URL of MongoDB is mongodb://root:secret@mongo-discord-cont:27017/
  • After that in root folder type in powershell: docker-compose -f docker-compose-dev.yml up
  • You will see the bot online in your server.
  • Verify that it works by trying the command /ping.
  • Happy coding!

๐Ÿ‘ท Manual

  • Clone the repo
  • Remove the .template from .env.template - If contributing, please revert this change!
  • Add required variables to .env
  • Run yarn install
  • Run node .

Contributions

While this bot is maintained by Kieran, contributors are welcome! See Contributing.md.

Invite

Invite Clarence to your discord server here with administrator and slash command permissions.

License

Clarence-Bot is licensed under the MIT License. The full license text is included in the LICENSE file in this repository. TLDR legal have a great summary of the license if you're interested.

clarence-bot's People

Contributors

branicekl avatar ch1nru5t avatar code4y avatar crimsontome avatar dependabot[bot] avatar duchvladimir avatar g0maa avatar github-actions[bot] avatar imgbotapp avatar ki-er avatar muditmahajan21 avatar ondrejmarcncak avatar rj564zi avatar rk250ky avatar shiva953 avatar stanislavkysela avatar taeh98 avatar viktorluk311 avatar vinitvh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

clarence-bot's Issues

Error in /joke command

Sometimes the bot would shut down after the /joke command.
Accidentally added the "n" alias for the -joke command
The description of /numberfact command is wrong.

Fix:
Add the deferReply to the /joke command to make it not throw an error if the interaction takes more than 3 seconds.
Remove the alias from the normal joke command
Edit the description of the /numberfact command

Imgur Command

Issue/Feature Description:
/Imgur

Why this issue to fixed / feature is needed(give scenarios or use cases):
Cool command

How to reproduce, in case of a bug:
NA

Other Notes / Environment Information: (Please give the env information, log link or any useful information for this issue)
https://www.npmjs.com/search?q=imgur

Channel info

/channelinfo optional: channel

If no channel is given then do interaction channel

Better development experience in containers

Goal:

  • Clearer documentation for running development environment.
  • Less steps to get the development environment up & running, I will probably create docker-compose-dev.yml, use nodemon and use docker volumes.

Bot crashes because of memberCount

I occasionally get this:

/usr/clarence/src/events/ready.js:8
                const { memberCount } = client.guilds.cache.get('744586833135927366');
                        ^

TypeError: Cannot destructure property 'memberCount' of 'client.guilds.cache.get(...)' as it is undefined.
    at Timeout._onTimeout (/usr/clarence/src/events/ready.js:8:11)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)

I traced it back to this block:

	setInterval(() => {
		const { memberCount } = client.guilds.cache.get('744586833135927366');
		const channel = client.channels.cache.get('857995452052799538');
		channel.setName(`Discord Members: ${memberCount.toLocaleString()}`);
	}, 600000);

I'm trying to fix, but... what is it supposed to do to begin with?

Command numberfact

  • A command to be added numberfact
  • This command shows a random number fact

Please assign me this under hacktoberfest

Add your own commands / features

If you stumble to this project and want to add any additional slash commands or events, feel free to open a PR or create an issue and Ill be happy to add them!

Just create an issue with your new addition and Ill assign it to you!

Cookie leaderboard

A /cookieleaderboard <global | guild> so that a local and a global leaderboard would be neat! Or just a standard local leaderboard would also work, totally up to you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.