#zak kaioken
Explore tagged Tumblr posts
Text
So I installed subway surfers since I haven't played it in like half a year and found out I was out alot longer than that...

Oof. So I did the math and found out...
I have been out for 2,194 years... Ouch.

I took the 737278 days and divided them by 7
Giving me 105,325 weeks.

Who gives up at weeks?
I took those weeks and further divided them by 4
26,331 months?! That's alot of months

Finally ending up with the number of years it took me to come back to the game

Don't get me wrong... Taking a break that long would be impossible
But dang doing it is another thing.
#subway surfers#android#oneplus#calculator#calculation#division#software gore#android p#zak kaioken#game#mobile game#iphone#google
1 note
·
View note
Text
How does abbybot work?
I have 4 api's in use.
The core bot is build apon discord.net.
it supplies the messages, and i can do things with them.
like checking for certain words or commands.
to do more complex things with the bot I made a message data class it stores all the useful information that specific message would be used for instance. (basic user info like ids, names; what guild theyre sending from, their guild rank color, the guild channel their sending messages from; etc.)
to save information I get I use mysql.
To make it easier to use i made a mysql user class which stores information about the user.
(like, their names, their discord ids, how many messages theyve sent and other silly things like their twitter account handle.)
speaking of twitter.
all i do is gather the tweets from the account associated to their mysql user.
but what's the use of taking tweets if your not gonna show them in their respective channel?
that brings me to commands. I have a basic string which holds a single character. we call it the prefix.
I just check if that character is being used with a command.
to show you the basics of the command system let's continue with twitter.
if someone was to say "%tweet" in chat...
I just take that users twitter handle from their user and search for a tweet. if i happen to find information on that tweet, I'll show it to the chat using what discord calls an embed.
the source is https://twitter.com/Himikorendi/status/1160040905237078016?s=20 btw
to show that i'm ending the command, I add to the current users messagesSent variable and then return the modified current user.
every command is similar. however the image part of the bot is a little different of a story.
just like with the twitter command I'll be searching for a command. however this time the commands are defined by an array of gelcommand information currently at the top of the bot. in simple terms I put the command here,
and the image tags here.
then inside the command I check if the user has the correct roles to run the command, if they do... I proceed to exeucte the command.
here's how the basic command works, you feed in tags, it gives back information about an image.
this is where you can either choose to embed the image directly from gelbooru or download it and upload it to discord yourself. and because we have access to the image data we can directly credit the author by including the source url in the embed.
when everything meets our requirements we'll build the embed then send it off to the channel it was requested from. (pointed out in the message above)
just like before we'll add to the current users commandusages variable.
at the end of all that wierd processing we send the new information about the user to the database.
That's the end of how the command section works. however sometimes you want to do things that shouldn't rely on getting messages.
which is why I implemented a timer before starting the discord.net connection. don't worry the timer runs on a different thread.
inside the timer i automate the tweet command for those who opted into tweetchannels.
for every user who opted into autotweeting,
we'll check if they've posted anything new in the last while
and if they have get at most 5 recent tweets.
currently there's no way to turn off the feature for users through code. a command switch for this will be coming eventually. also inside the timer is the new user checker. it just checks if a new user has introduced themseves. if we have a new user we single them out and add them to the database.
That in a nutshell is how abbybot works. It is and is not alot at the same time.
This is currently my best project and i love working on it :)
#abbybot#abby kaioken#zak kaioken#gelbooru#c#csharp#discord#discord.net#discord bot#tweetsharp#twitter#tweet
1 note
·
View note
Text
New welcome and goodbye message breakdown
I added these new welcome and goodbye messages for my friends server (which the details of are censored btw)
This one shows up when someone joins for the first time

If you leave this will show up

It can get annoying when someone leaves the server and comes back. so I made the welcome back message short and simple.

Let me break down how it works for you
the method starts by creating an embed builder and setting the default message
(the message stringbuilder is created at the top of the program)
This part checks for the user in the u list
if one is found I
set the current user to the one already saved in my database
tell the rest of the method that theyre a returning user
and set the new title to a welcome back one instead
then I reset the stringbuilder to start building the description
if the user is returning, i’ll attach a “I missed you! :p” otherwise
I append the new member information.
just for some added silliness I also made a joke for when other bots get added to the server :p
and finally I set the color and send the message.
the goodbye message is alot simpler
Thanks for reading about this wierd discord bot 😉
#discord#discord bot#csharp#programming#abbybot#code breakdown#discord.net#embedbuilder#code#dotnetdeveloper#skyoken#zak kaioken#abby kaioken#visual studio
1 note
·
View note