Code Monkey home page Code Monkey logo

autodelete's People

Contributors

conceptual-perception avatar fiveneins avatar jacoknapp avatar phalanxia avatar riking 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

autodelete's Issues

Ignore pinned messages

Is it possible to have the bot ignore pinned messages, so that you can have a bot-command channel with a pinned message, and have all other messages deleted every 24 hours.

Use constants or flags for magic numbers

Use constants or flags for magic numbers: Instead of hardcoding values like time.Hour*1, "/debug/pprof/", and "/metrics", define them as constants or flags. This improves code readability and makes it easier to change these values in the future.

"Encountered error, settings may or may not have saved."

After I to the start command I get this:

Encountered error, settings may or may not have saved.
open ./data/1031004874697097297.yml: too many open files

The message from the bot stating that messages will be deleted automatically is in the channel but deletes do not happen.

Screen Shot 2022-10-16 at 6 45 44 PM

Autodelet it doesn't work on one of my servers

Hello, I have my server very configured in chat, but one day the autodelet missed an error for something and then it stopped working on my main server, but it continues to work on the others, how can it be solved?

Dockerfile is failing to build

Looking to self host to help lighten the load, but build is failing.

(Reading database ... 100%
(Reading database ... 15709 files and directories currently installed.)
Preparing to unpack .../linux-libc-dev_5.10.113-1_amd64.deb ...
Unpacking linux-libc-dev:amd64 (5.10.113-1) over (5.10.106-1) ...
Setting up linux-libc-dev:amd64 (5.10.113-1) ...
Processing triggers for libc-bin (2.31-13+deb11u3) ...

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
git is already the newest version (1:2.30.2-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

go: go.mod file not found in current directory or any parent directory.
	'go get' is no longer supported outside a module.
	To build and install a command, use 'go install' with a version,
	like 'go install example.com/cmd@latest'
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.
The command '/bin/sh -c apt update -y --allow-insecure-repositories && apt upgrade -y &&   apt install -y git &&   apt -y clean &&   go get -u -v github.com/riking/AutoDelete/cmd/autodelete' returned a non-zero code: 1
exit status 1
Exit Code 1

Request: Add all channels configured printed in one message

I would like to have the ability to type a command like "@autodelete servercheck or @autodelete guildcheck" and it would display a message of all the channels it is currently configured in. This would help out in bigger servers making sure that all the channels that need setup are without going into each channel.

Ex.

#Welcome (message count) (duration)
#Rules (message count) (duration)

and so on.

Not compatible with permission from role?

To manage bot, we need "Manage Message" permission as you know.

Unfortunately, this restriction doesn't accept the perm from role.
So we need to apply role to each users one-by-one.

This behavior may not be smart.
Or, it causes on my environment only?

Bot not responding on commands

Hi! When I first invited the bot, it didn't respond to any commands. Then I kicked it and invited again. It started working. But when I returned after several hours, it agains seems not reacting to any commands

What can be the reason?

Simplify goroutine creation

Instead of using an anonymous goroutine function, you can create named functions and use the go keyword to start them as goroutines. This makes the code easier to read and understand

Can the bots permissions be locked?

Normally bots we add to our server have permissions locked without any ability to modify them and their role has a locked symbol and always stays on top of the roles list. This makes it much cleaner and easier to see which role is for a bot only. Bots typically also do role names in a slug format "auto-delete" to better indicate it is a role not a name.

PS: why do I need to use @/AutoDelete and not a bot command? It's more convenient to use a bot command like "&", isn't it?

Thanks for the bot, it is working great!

Dockerfile build issue

My daily docker builds started failing a couple of days ago. Any ideas?

docker build -t autodeletetest https://github.com/riking/AutoDelete.git

Current default time zone: 'Etc/UTC'
Local time is now:      Thu Jun 23 13:03:15 UTC 2022.
Universal Time is now:  Thu Jun 23 13:03:15 UTC 2022.
Run 'dpkg-reconfigure tzdata' if you wish to change it.


WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
git is already the newest version (1:2.30.2-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

go: go.mod file not found in current directory or any parent directory.
        'go get' is no longer supported outside a module.
        To build and install a command, use 'go install' with a version,
        like 'go install example.com/cmd@latest'
        For more information, see https://golang.org/doc/go-get-install-deprecation
        or run 'go help get' or 'go help install'.
The command '/bin/sh -c apt update -y --allow-insecure-repositories && apt upgrade -y &&   apt install -y git &&   apt -y clean &&   go get -u -v github.com/riking/AutoDelete/cmd/autodelete' returned a non-zero code: 1

https://autodelete.riking.org/ 502 Bad Gateway

Since 2nd June the website can't be reached, this affects bot installation and most likely even the function that messages are deleted.

Can't test functionality cause i don't have a server with this bot installed but I would really like to use it in a server I just created.

Displayed "delete time" is wrong.

I was fiddeling around with the autodelete time.
i set it to 1h first and after that set it to 24h.

The instantly shown message is correct with 24h delete time.
But after the first delete the bot shows only 1h of deletion time:
AutoDelete: Messages in this channel will be deleted after 1h0m0s.

The messages will still be deleted after 24h so i guess it might have to do with the previous 1h setting?

Single-message delete triggers LoadBacklog too early

After a single-message delete has been kicked off, the channel can be readded to the reaper queue, and the backlog reloaded, before the messages have finished being deleted. This can cause the messages to receive two deletion attempts, causing a flurry of errors.

Start

How can i start the File? I want to host it on repl.it, but how do i start it. i dont understand it

Autodelete code

Screenshot_20221011-103922_Samsung Internet
What part of the code do i need to copy so I can copy the autodelete code to my bot? And what program can i use to code it? Thankyou

Stopped Deleting and Responding

Seems the bot has stopped deleting in a channel that has been setup for a very long time. I tried to reset the settings but @AutoDelete set 0 and then setting it back to our original setting, but it seems the bot won't respond to any commands. Not even @AutoDelete help.

Feature Request: Next Clear Timestamp

I'd like an option that for the message the bot leaves in the channel, Messages in this channel will be deleted after X it also includes a relative timestamp as a sort of countdown to the next clearing.

Not deleting messages

I set up the bot in a channel with:

@AutoDelete set 72h

It gives the following warning and does nothing:

The number of messages in this channel is over 200. Messages may not be reliably deleted. (Saw: 200)

bot is offline and not working

so it seems like that the bot is offline and wont work through its command i wanted to inform you guys so guys pls fix it tnx for the good bot <33
ScreenShot_20211021125303

Bot won't respond

My friend used this in his Discord server, so I decided to get it. For some reason though, it won't respond to me.
image

Weirdly, in my friend's server, it has a status of "Playing in the garbage" but in my server, it has no status at all.

Feature request: Ignore message by ID or author

It will be nice if the bot supports filters to ignore some messages when deleting, it can be useful for channels that must keep some messages (or messages sent from a specific author) when deleting other messages.

Bot randomly resetting all settings

Greetings, we have been using the bot for years now and once again it has happened that all our settings got reset and no messages were getting deleted. We had to re-set the bot in every channel manually.

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.