View difference between Paste ID: vLEWT4dX and xiUdQ5hk
SHOW: | | - or go back to the newest paste.
1
a=["has been following","for","days","day"];
2
b=["подписан на канал","уже","дней","день"];
3
for(i=0;i<a.length;i++){
4
	t=t.replace(a[i], b[i]);
5
}
6
if(t.includes('is not following')){
7-
	if(t.split(' ')[0] === '@h1kh'){
7+
	if(t.split(' ')[0] === '@realdjox'){
8-
        unsub = 'H1kH является владельцем данного канала EZ';
8+
        unsub = 'RealDjox здесь дольше всех CoolCat';
9
    }
10
	else{
11
        emotes = ['NotLikeThis', 'PoroSad', 'BibleThump', 'peepoSad'];
12
        unsub=t.split(' ')[0] + ' не подписан на канал ' + emotes[Math.floor(Math.random() * emotes.length)];
13
    }
14
	t=unsub;
15
}
16
17
t_split = t.split(' ');
18
days = t_split[t_split.length - 2];
19
if(days%100 >= 11 && days%100 <= 14){
20
	t=t.replace('дней','дней');
21
}
22
else{
23
	switch(days%10){
24
        case 1:
25
            t=t.replace('дней', 'день');
26
            break;
27
        case 2:
28
        case 3:
29
        case 4:
30
            t=t.replace('дней','дня');
31
            break;
32
        default:
33
            t=t.replace('дней','дней');
34
            break;
35
    }
36
}
37
38-
if(t.includes('@h1kh уже')){
38+
if(t.includes('@realdjox уже')){
39-
    t=t.replace('@h1kh', 'Хика');
39+
    t=t.replace('@realdjox', 'RealDjox');
40
}
41
if (t.toLowerCase().includes('could not find a twitch account')){
42
    t='Не удалось найти пользователя -> ' + t.split(' ').pop();
43
}
44
if (t.toLowerCase().includes('could not get users from twitch api')){
45
	t='Не удалось получить пользователей из Twitch API, имя пользователя недействительно -> ' + t.split(' ').pop();
46
}
47
if (t.toLowerCase().includes('remote server')){
48
	t='Ошибка сервера 404: пользователь не найден.';
49
}
50-
50+
51
if(t.split(' ')[0] === '@lizkasosiska19'){
52
    t = t + ' [P.S. с 01.11.2020]'
53
}