Ejemplo n.º 1
0
        static async Task ReadyHandler(DiscordClient client, ReadyEventArgs e)
        {
            try
            {
                BotGuild = discord.GetShard(388339196978266114).GetGuildAsync(388339196978266114).Result;
                Mrcarrot = BotGuild.GetMemberAsync(366298290377195522).Result;
                Logger.Log("Connection ready");
                Utils.GuildCount = 0;
                foreach (DiscordClient shard in discord.ShardClients.Values)
                {
                    Utils.GuildCount += shard.Guilds.Count;
                }
                await discord.UpdateStatusAsync(new DiscordActivity($"in {Utils.GuildCount} servers | {commandPrefix}help", ActivityType.Playing));

                if (firstRun)
                {
                    await Conversation.Conversation.StartConversation(false);

                    firstRun = false;
                }
                LevelingData.LoadDatabase();
                //await BotGuild.GetChannel(502841234285527041).SendMessageAsync("CarrotBot ready.");
            }
            catch (Exception ee)
            {
                Logger.Log(ee.ToString(), Logger.CBLogLevel.EXC);
            }
        }
Ejemplo n.º 2
0
 public void PlusScroe()
 {
     _score++;
     txtScore.text = _score.ToString();
     if (_score % 5 == 0)
     {
         LevelingData.SetNextLevel(_score);
     }
 }
Ejemplo n.º 3
0
 public void ClickHome()
 {
     LevelingData.ReSetData();
     UnityEngine.SceneManagement.SceneManager.LoadScene(0);
 }