DOClanManager Discord Bot

04/11/2020 14:10 Supermecha2#16
Version 1.3.4

Improvements
- Added "You do not have 'linked account' permission", when someone tries to "accept" or "rank" themselves when they don't have a linked account
- Improved base spam posting; Bot will post all log entries made at a given read time, even if same base name; when a player changes their name, this should not effect the bot posting entries at all

Bug Fixes
- FIXED: Discord sometimes "double-posts" messages, so bot sometimes made a double base post; from now on all base posts in #active-bases apart from sticky bot messages will be deleted

1.3.4.1
- FIXED: "accept[me]" would sometimes also accept other linked people

1.3.4.2
- Added "Module Owner Names" for every #active-base, which'll show you the names of all members who have performed a module replacement
(useful when checking who might destroy a module if they leave clan)
(As with "Recent Clan Attackers", max number of names is '10' and max size of a name is '20')

1.3.4.3
- FIXED: Bug on base log entries when player changes their name

1.3.4.5
- Bot will no longer `@here`

1.3.4.6
- FIXED: parsing of base time

Version 1.3.5.0
- Added auto-restart every 2 hours* (separate script)
*Subject to change
- Added unlinkMe command
- Various bug fixes to how "active-bases" are handled
- Increased/Added delays between post edits/deletions
04/12/2020 20:35 tupacSE#17
+rep
04/15/2020 21:22 W3ax#18
Good work, nice and regular updates. Idk what to say, keep it up dude! 'clap' :feelsgoodman:
05/17/2020 21:11 Supermecha2#19
Version: 1.4.0.0

This update features "Diplomacy tracking"
Every 10* minutes the bot will load the "Diplomacy" page and attempt to find "new diplomacy requests" and "ended/started diplomacies"

For new Diplomacy Requests
- These will be posted in #log

For Diplomacy Changes
- When a clan cancels a diplomacy with yours the bot will post this in #logs
- Likewise, when you accept a new diplomacy, the bot will also post this in #logs
- (FAILSAFE) Kicking the bot from the clan will not spam #logs with all ended diplomacies

"showDiploReqs" command
- Will show you all diplomacy requests to your clan
- Requires 'verified linked account' permission

#diplomacy Channel
- [OPTIONAL] You can have a #diplomacy channel and the bot will post every single clan diplomacy instead, and maintain them by editing every 10 minutes whenever a change is made; similar to #active-bases

VPS Stuff
- Added script to "StartUp" directory, so should restart all bots following a windows update or whatever

Bug Fixes/Improvements
- Fixed up the "active-base" handler; now it will no longer post 10 bases, delete 9, post 9 delete 8, etc; now it will post 10 and maintain

_______________

Version 1.4.0.1

- Added back "Type" of diplomacy to be shown when a new diplomacy is started or current ended
- Also I noticed that the bot will think a new diplomacy has begun and one has ended when a clan you are currently related with has their name changed, so can track clan name changes, likewise for request
05/19/2020 11:11 Supermecha2#20
1.4.0.2
- Bot will now compare the "profile link" of the username you want to "kick" or "accept" against the profile link of all applicants, instead of comparing against username
(Allowing for a wider range of usernames to be accepted)
- Added "You do not have role with auto-accept permissions" to inform people who don't have a role that can allow them to use "accept"

1.4.0.3
- On startup, bot will no longer initialise all "active-bases" with all information extracted from the battle station backpage
(This ensures only data found while the bot is actually active is being written)

1.4.0.4
- Added lockAccept toggle command, which'll prevent the bot from accepting people
(Roles with "set anyone's rank" can call it)
05/27/2020 22:33 Supermecha2#21
Version 1.4.1.0
FIXED Notification bug
2 hourly bot restarts resulted in the removal of "set notifications" (e.g.: a notifier set to go off in 23 hours, but cause of bot restart it was removed)
The bot will now store these in a file and reload on startup ensuring none are removed
06/11/2020 23:51 Supermecha2#22
Version 2.0.0.0
Complete refactoring of the code, and revision of almost everything.

- Removed weekly scheduler and its associated commands
- "bases" and "base" commands will now load a fresh page, then show you the base details instead of latching onto the automatic "active-bases" process for its previous value
- Added ability to link with profile url
- UsernameTracker will add profile urls without the language extension to support servers which may decide to switch languages
- Fixed "Accept" commands; "accept me" will no longer work; you'll have to write "acceptme"
- Added more detailed "set rank" reply
- Removed "rankno" since it was based on a language specific value
- Added ability to pass in values space separated
- Added complete revision of my "DOLogin" dll (rewrote this to work much better than the previous)
- Smarter login checks, bot will test whether its session is valid every 2* minutes, instead of every time before a request is made
- Debug logging improvements for myself
06/22/2020 01:08 Supermecha2#23
Version 2.0.1.0
- Fixed profile url comparing bug; previous version was storing with"Https", whereas this one is using "Http"; the bot will now extract the base64 id and compare them using that
(Note: this also allows for url comparison when the languages are different)

Version 2.0.1.1
- Lower case 'i' instead of upper case, fixed in "profile10" php request

Version 2.0.2.0
- Added "RankUpDownChannelId" to each server profile; when specified the bot will announce whenever a user has "ranked up" or "ranked down" (ask me if you want this enabled on your server; I only enabled it on a few)
- It will only consider roles which have a mapping to a "clan rank"

Version 2.0.2.1
- Fixed minor bug with "linking" on profile url
- When a new link is made the bot will post an embed (see image below), this will make the bot no longer mention all verified players when someone links for the first time
- Added "profile url" to show when someone unlinks

Version 2.0.3.0
Some quick fixes/improvements
- Removed acceptAll command
- Modified "accept <name>" command; you no longer need to put "" around if the name has spaces
- Modified "rank" command response if the rank is does not exist in the clan
[Only registered and activated users can see links. Click Here To Register...]

Version 2.0.4.0
- Added whoLinked <username> command, which does you all discord users linked to <username>
- Added me command, to show you your linked account's info, useful for quickly finding your profile url, user id and username

Version 2.0.5.0
- Added detection for when base is "under construction"
- New color coding and ordering,
BLACK - Base is under construction
ORANGE - Base doesn't have 10/10 modules
BLUE* - Deflector is up
RED - Deflector is down

*Screenshot shows dark blue but this has changed to light blue

Version 2.0.5.1
- Corrected translation for "ON" in german (it is "AN")
09/21/2020 11:56 Vergesse#24
Great discord bot +++
very friendly and trusted guy
12/31/2020 14:57 Supermecha2#25
Version 2.0.6.0
(Mainly just for me to use in event :heh:)
- Added gs command
Usage: `-gs <username>`
Will show you whether <username> is in the top 100 of Galactic Strife Top Rep, and if they are,
their rank position and score
[Only registered and activated users can see links. Click Here To Register...]


Version 2.0.6.1
- Bug Fix: Clans that have entries from over a year ago had issues with taking the new base-log entries. Since the bot determines the highest log entry time and ignores all entries with times earlier than it.
Before updating the highest log entry time, it will now compare the day and month with the current system time's ones
__Example__
4/10
25/10 <-- 1 year ago
Bot will not post any entries made from 4/10 onwards until the 25th (FIXED)

Version 2.0.7.0
- Added "rankAll" command to rank every single member in the clan to the given rank name, excluding the bot itself
Permissions: To call this call you need to have "SetAnyoneRank" permission
Example
-rankAll member
Then the bot will begin to rank every member in the clan to "member"

Version 2.0.7.1
- Fixed issue with using same reload token to make the set rank requests when "rankAll" is called

Version 2.0.7.2
- Bot will now reply who kicked/unlinked who
- Bot will trim rank names so names with leading and trailing whitespaces can be used

Version 2.0.7.3
- Added warChain command to send wars to every clan id within the given range specified (both ends inclusive)
- Requires "Diplo" permission
- You cannot call the same command until the previous ends

*I won't add this to the #help of the bot since I don't think many will use it
I also don't advice using this. It puts a lot of strain on the vps' network usage, and may result in the alt acc in clan getting blocked by DO as too many requests

Version 2.0.7.4
- When you lose diplo permissions the "warChain" will end

Version 2.0.7.5
- More descriptive info post when you add a new person to the tracker
[Only registered and activated users can see links. Click Here To Register...]

Version 2.0.7.6
- Fixed bug in determining whether a profile url you link on is valid

Version 2.0.7.7
- Fixed log channel messages; whenever you kick or unlink someone the person who did so will be posted in the log channel

Version 2.0.7.8
- Increased usernametracker profile username check interval to every 10 minutes

Version 2.0.7.9
- Bot will no longer post a message saying a command is invalid
- Fixed bug in usernametracker; it'll now correctly track name changes

Version 2.0.8.0
- Added bot posting to #log-channel whenever a new player applies to your clan. You can then copy and paste their name into an "accept" command call: -accept <copyPasteName> to accept them
- Check for new applicants is made every 5 minutes
[Only registered and activated users can see links. Click Here To Register...]

Version 2.0.8.1
- Added spoofing of client useragent (Bigpoint/1.4.6), this will fix the issue with the bot trying to extract the username out of the profile url; you can now again link using a profile url
- Modified "who" command to give you the full details of the person (same as the "me" command)

Version 2.0.8.2
- Removed "warChain" command

- Added warTopClans command which given a "page number" and "description" (optional) will send war to every top clan listed in the given "page number" from the "Top Clans" hall of fame page
*(Similar semantics to "warChain", it'll stop sending wars as soon as the person who wrote the command loses their permissions, and only 1 "warTopClans" call can be run at a time)*

- Improvement: modified the sending of a diplomacy to also get the clan name and post that whenever you send a diplomacy so #logs are more detailed now for diplomacy
[Only registered and activated users can see links. Click Here To Register...]

- Modified auto-restart script to every 5 hours (from 3 hours)
07/07/2021 17:18 Supermecha2#26
Version 2.2.0.0
Similar to the [Only registered and activated users can see links. Click Here To Register...], I have added a webpage where you can configure the bot.

Why use the website?
The website will allow you to modify the configuration settings of the bot. For example, you can change the discord roles to clan names, channel ids, the bots Darkorbit account credentials, etc. This is very useful if you are redesigning your discord server with new channels and deleting old ones.

Website Link
[Only registered and activated users can see links. Click Here To Register...]
This link is also shown when you use the "help" command.

How do I login?
Right now all the bots use a login token that is bound to my discord account. If you want to configure the bot you will need to **ask me for your bot's login token**. Alternatively, if you want the bot to be bound to your discord account then that can be arranged as well.

Sharing the Discord Bot Login Token
You must not share the bot login token with anyone as they can login a discord bot to your server from it. If you are worried the token was leaked somehow, Discord normally makes it invalid and prevents people from using it, however on the website you can change the token to anything you want. But bare in mind if it's invalid the bot will not be able to connect.

Synchronizing the changes to the bot: "restart" command
The bot now has a "restart" command which will completely relog the bot, loading in the most up to date details for its configuration. It is therefore advised you only use this command when you are happy with the settings (if you have changed anything). Otherwise if you think the bot is not responding, you can restart it for that reason as well.

Auto restarts
All bots will undergo a forced restart every 24* hours.

Screenshots
I have attached a screenshot to this post, but you'll find more on the website itself.
09/29/2021 17:37 günther341#27
Hello,

i can´t find you on discord, is your username correct?
05/12/2023 08:39 Jamielonger#28
is this service still available